scrollbar for monaco updates

This commit is contained in:
Nate Kelley 2025-04-03 15:55:06 -06:00
parent 4ed586c4ae
commit 285f14c24d
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
3 changed files with 22 additions and 6 deletions

View File

@ -83,6 +83,11 @@ export const AppCodeEditor = forwardRef<AppCodeEditorHandle, AppCodeEditorProps>
minimap: {
enabled: false
},
scrollbar: {
verticalScrollbarSize: 5,
alwaysConsumeMouseWheel: false,
useShadows: false
},
padding: {
top: 10
},

View File

@ -67,6 +67,15 @@ export const AppDiffCodeEditor = forwardRef<AppDiffCodeEditorHandle, AppDiffCode
renderOverviewRuler: false,
wordWrap: 'on',
scrollBeyondLastLine: true,
scrollbar: {
verticalScrollbarSize: 5,
alwaysConsumeMouseWheel: false,
useShadows: false
},
padding: {
top: 10
},
glyphMargin: false,
minimap: {
enabled: false
},
@ -103,11 +112,18 @@ export const AppDiffCodeEditor = forwardRef<AppDiffCodeEditorHandle, AppDiffCode
const originalEditor = editor.getOriginalEditor();
originalEditor.updateOptions({
wordWrap: 'on',
wrappingStrategy: 'advanced'
wrappingStrategy: 'advanced',
padding: { top: 16 },
glyphMargin: true
});
// Get the modified editor and add change listener
const modifiedEditor = editor.getModifiedEditor();
modifiedEditor.updateOptions({
padding: { top: 16 },
glyphMargin: true
});
if (!readOnly && !disabled) {
modifiedEditor.onDidChangeModelContent(() => {
onChange?.(modifiedEditor.getValue() || '');

View File

@ -130,11 +130,6 @@ export const TermIndividualContent: React.FC<{
onChange={(v) => {
onSetTermSQL.run(v);
}}
monacoEditorOptions={{
scrollbar: {
alwaysConsumeMouseWheel: false
}
}}
/>
</div>
</ItemContainer>