From 2d567e282b29b951156b5069768f802d7dd1219a Mon Sep 17 00:00:00 2001 From: Grigory Date: Mon, 17 Feb 2025 20:42:24 +0500 Subject: [PATCH] `shouldRestoreSelection` -> `shouldRestoreSelectionS` --- src/DocumentWatcher.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/DocumentWatcher.ts b/src/DocumentWatcher.ts index cf89602..9882e09 100644 --- a/src/DocumentWatcher.ts +++ b/src/DocumentWatcher.ts @@ -41,7 +41,7 @@ export default class DocumentWatcher { let editedDoc: TextDocument | undefined - let shouldRestoreSelection = false + let shouldRestoreSelections = false let previousSelections: Selection[] = [] @@ -72,13 +72,13 @@ export default class DocumentWatcher { const activeEditor = window.activeTextEditor const activeDoc = activeEditor?.document if ( - shouldRestoreSelection && + shouldRestoreSelections && activeEditor && doc === editedDoc && doc === activeDoc ) { activeEditor.selections = [...previousSelections] - shouldRestoreSelection = false + shouldRestoreSelections = false } if (path.basename(doc.fileName) === '.editorconfig') { @@ -99,7 +99,7 @@ export default class DocumentWatcher { e.reason, ) e.waitUntil(transformations) - shouldRestoreSelection = (await transformations).length > 0 + shouldRestoreSelections = (await transformations).length > 0 editedDoc = activeDoc }), )