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
This commit is contained in:
Keerthana Panyam 2025-03-06 13:18:41 -05:00
parent 54c364d1cd
commit dc33d50c92

View file

@ -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,
});