From b213ca1b40aeab30e6c184779af8e0be6e45a8f2 Mon Sep 17 00:00:00 2001 From: Grigory Date: Sat, 8 Feb 2025 19:55:18 +0500 Subject: [PATCH] restore selection first --- src/DocumentWatcher.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/DocumentWatcher.ts b/src/DocumentWatcher.ts index d682a7e..e48585a 100644 --- a/src/DocumentWatcher.ts +++ b/src/DocumentWatcher.ts @@ -65,14 +65,14 @@ export default class DocumentWatcher { subscriptions.push( workspace.onDidSaveTextDocument(doc => { - if (path.basename(doc.fileName) === '.editorconfig') { - this.log('.editorconfig file saved.') - } - const activeEditor = window.activeTextEditor if (activeEditor && previousSelections.length) { activeEditor.selections = previousSelections } + + if (path.basename(doc.fileName) === '.editorconfig') { + this.log('.editorconfig file saved.') + } }), )