Skip to content

Commit 6992462

Browse files
committed
debounce outline subscriptions
1 parent 907f45d commit 6992462

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/runtime/outline.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function activate (ink) {
1818
subs.add(client.onDetached(() => pane.setItems([])))
1919

2020
let edSubs = new CompositeDisposable()
21-
subs.add(atom.workspace.onDidChangeActiveTextEditor(ed => {
21+
subs.add(atom.workspace.onDidChangeActiveTextEditor(throttle(ed => {
2222
if (!ed) return
2323

2424
edSubs.dispose()
@@ -65,7 +65,7 @@ export function activate (ink) {
6565
}).then(outlineItems => {
6666
outline = handleOutline(ed, edSubs, outlineItems)
6767
})
68-
}))
68+
}, 300)))
6969
}
7070

7171
// NOTE: update outline and symbols cache all in one go

0 commit comments

Comments
 (0)