Skip to content

Commit 48f47a4

Browse files
authored
Merge pull request #117 from atom-community/fix-double-calls
2 parents 1f34428 + b7a0c4b commit 48f47a4

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/main.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ function addCommands() {
3535
}
3636

3737
function addObservers() {
38-
subscriptions.add(atom.workspace.observeActiveTextEditor(editorChanged))
38+
// if the active text editor changed (switched to another editor), then call editorChanged function
39+
subscriptions.add(atom.workspace.onDidChangeActiveTextEditor(editorChanged))
3940
}
4041

4142
export function deactivate() {
@@ -164,11 +165,8 @@ export async function getOutline(editor = atom.workspace.getActiveTextEditor())
164165
return setStatus("noProvider")
165166
}
166167

167-
// const target = editor.getPath()
168-
169-
// const busySignalID = `Outline: ${target}`
170-
// // @ts-ignore
171-
// busySignalProvider?.add(busySignalID, { onlyForFile: target })
168+
// const busySignalID = `Outline: ${editor.getPath()}`
169+
// busySignalProvider?.add(busySignalID)
172170

173171
const outline = await provider.getOutline(editor)
174172
view.setOutline(outline?.outlineTrees ?? [], editor, Boolean(editorLargeness(editor as TextEditor)))

0 commit comments

Comments
 (0)