From 1d3e741ad4737773148d124352e3df0e1a7e4104 Mon Sep 17 00:00:00 2001 From: Kai Saba Date: Fri, 13 Dec 2024 10:51:59 +0100 Subject: [PATCH] fix: don't change selection for locked code if only moving cursor --- src/tools.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools.ts b/src/tools.ts index 9684c8a..17219a5 100644 --- a/src/tools.ts +++ b/src/tools.ts @@ -177,7 +177,7 @@ export function lockCodeRanges ( // Handle selection of the last line of an editable range disposableStore.add( editor.onDidChangeCursorSelection((e) => { - if (canEditRange(e.selection)) { + if (canEditRange(e.selection) || e.selection.isEmpty()) { return } const model = editor.getModel()