Skip to content

Commit

Permalink
restore selection first
Browse files Browse the repository at this point in the history
  • Loading branch information
SunsetTechuila committed Feb 8, 2025
1 parent 92bfe6e commit b213ca1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/DocumentWatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
}
}),
)

Expand Down

0 comments on commit b213ca1

Please sign in to comment.