Skip to content

Commit

Permalink
shouldRestoreSelection -> shouldRestoreSelectionS
Browse files Browse the repository at this point in the history
  • Loading branch information
SunsetTechuila committed Feb 17, 2025
1 parent 60249a0 commit 2d567e2
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 @@ -41,7 +41,7 @@ export default class DocumentWatcher {

let editedDoc: TextDocument | undefined

let shouldRestoreSelection = false
let shouldRestoreSelections = false

let previousSelections: Selection[] = []

Expand Down Expand Up @@ -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') {
Expand All @@ -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
}),
)
Expand Down

0 comments on commit 2d567e2

Please sign in to comment.