From dc33d50c924c677d0946b058430fb285457d04ea Mon Sep 17 00:00:00 2001 From: Keerthana Panyam Date: Thu, 6 Mar 2025 13:18:41 -0500 Subject: [PATCH] edit mode code highlighting fixed to not override cursor selection When switching to the edit mode and we make a selection of code, it needs to appear above the highlighting not be obscured by it. In this fix, instead of using an opaque background colour for the highlighting decoration, we use a highlighting with opacity so that the selected code is visible below it --- extensions/vscode/src/quickEdit/EditDecorationManager.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/vscode/src/quickEdit/EditDecorationManager.ts b/extensions/vscode/src/quickEdit/EditDecorationManager.ts index 04e27d7ee..544287483 100644 --- a/extensions/vscode/src/quickEdit/EditDecorationManager.ts +++ b/extensions/vscode/src/quickEdit/EditDecorationManager.ts @@ -6,7 +6,10 @@ class EditDecorationManager { constructor(context: vscode.ExtensionContext) { this.decorationType = vscode.window.createTextEditorDecorationType({ backgroundColor: new vscode.ThemeColor( - "editor.inactiveSelectionBackground", + // "editor.selectionHighlightBackground" requires partial transparency. + // This ensures the highlight does not completely obscure the selection, + // making it useful for repurposing here. + "editor.selectionHighlightBackground", ), isWholeLine: true, });