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: { minimap: {
enabled: false enabled: false
}, },
scrollbar: {
verticalScrollbarSize: 5,
alwaysConsumeMouseWheel: false,
useShadows: false
},
padding: { padding: {
top: 10 top: 10
}, },

View File

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

View File

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