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:
parent
54c364d1cd
commit
dc33d50c92
1 changed files with 4 additions and 1 deletions
|
|
@ -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,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue