From b73c945ce5c90fc51364bff656c8043240411fe1 Mon Sep 17 00:00:00 2001 From: Thomas Seeley Date: Fri, 17 Apr 2026 10:11:56 -0400 Subject: [PATCH] disable cmd+shift+l, orange text selection and highlights, hover stays in editor bounds --- extensions/theme-defaults/themes/membrane_dark.json | 4 ++++ extensions/theme-defaults/themes/membrane_light.json | 4 ++++ .../viewParts/contentWidgets/contentWidgets.ts | 3 ++- .../contrib/hover/browser/resizableContentWidget.ts | 3 ++- .../editor/contrib/multicursor/browser/multicursor.ts | 11 ++++++----- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/extensions/theme-defaults/themes/membrane_dark.json b/extensions/theme-defaults/themes/membrane_dark.json index 1bf23eac16b27e..b62aaad755cb7d 100644 --- a/extensions/theme-defaults/themes/membrane_dark.json +++ b/extensions/theme-defaults/themes/membrane_dark.json @@ -4,6 +4,10 @@ "include": "./dark_modern.json", "colors": { "sash.hoverBorder": "#808080", + "editor.selectionBackground": "#ff800033", + "editor.hoverHighlightBackground": "#ff800033", + "editor.wordHighlightBackground": "#ff800033", + "editor.wordHighlightStrongBackground": "#ff800044", "editorCodeLens.foreground": "#845bff", "menu.selectionBackground": "#2a2a2a", "menu.border": "#282828", diff --git a/extensions/theme-defaults/themes/membrane_light.json b/extensions/theme-defaults/themes/membrane_light.json index 876b923f385f8d..e24304bd28ce4e 100644 --- a/extensions/theme-defaults/themes/membrane_light.json +++ b/extensions/theme-defaults/themes/membrane_light.json @@ -4,6 +4,10 @@ "include": "./light_modern.json", "colors": { "sash.hoverBorder": "#999", + "editor.selectionBackground": "#ff800033", + "editor.hoverHighlightBackground": "#ff800033", + "editor.wordHighlightBackground": "#ff800033", + "editor.wordHighlightStrongBackground": "#ff800044", "diffEditor.unchangedRegionBackground": "#efefef", "activityBar.activeBorder": "#3c3c3c", "activityBar.background": "#ddd", diff --git a/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts b/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts index 2c9595382e020c..646557d0088622 100644 --- a/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts +++ b/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts @@ -313,7 +313,8 @@ class Widget { const underLineTop = anchor.top + anchor.height; const heightAvailableUnderLine = ctx.viewportHeight - underLineTop; - const aboveTop = aboveLineTop - height; + // MEMBRANE: Clamp aboveTop to 0 so hover never escapes above the editor viewport + const aboveTop = Math.max(0, aboveLineTop - height); const fitsAbove = (heightAvailableAboveLine >= height); const belowTop = underLineTop; const fitsBelow = (heightAvailableUnderLine >= height); diff --git a/src/vs/editor/contrib/hover/browser/resizableContentWidget.ts b/src/vs/editor/contrib/hover/browser/resizableContentWidget.ts index 7ff606a1e15f12..955c5e6831c6ec 100644 --- a/src/vs/editor/contrib/hover/browser/resizableContentWidget.ts +++ b/src/vs/editor/contrib/hover/browser/resizableContentWidget.ts @@ -15,7 +15,8 @@ const BOTTOM_HEIGHT = 24; export abstract class ResizableContentWidget extends Disposable implements IContentWidget { - readonly allowEditorOverflow: boolean = true; + // MEMBRANE: Keep hover within editor bounds to prevent overflow outside the visible area + readonly allowEditorOverflow: boolean = false; readonly suppressMouseDown: boolean = false; protected readonly _resizableNode = this._register(new ResizableHTMLElement()); diff --git a/src/vs/editor/contrib/multicursor/browser/multicursor.ts b/src/vs/editor/contrib/multicursor/browser/multicursor.ts index a144dce617f30b..2145272b65dbfb 100644 --- a/src/vs/editor/contrib/multicursor/browser/multicursor.ts +++ b/src/vs/editor/contrib/multicursor/browser/multicursor.ts @@ -767,11 +767,12 @@ export class SelectHighlightsAction extends MultiCursorSelectionControllerAction id: 'editor.action.selectHighlights', label: nls.localize2('selectAllOccurrencesOfFindMatch', "Select All Occurrences of Find Match"), precondition: undefined, - kbOpts: { - kbExpr: EditorContextKeys.focus, - primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyL, - weight: KeybindingWeight.EditorContrib - }, + // MEMBRANE: Disable Cmd+Shift+L keybinding + // kbOpts: { + // kbExpr: EditorContextKeys.focus, + // primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyL, + // weight: KeybindingWeight.EditorContrib + // }, menuOpts: { menuId: MenuId.MenubarSelectionMenu, group: '3_multi',