File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export function activate (ink) {
18
18
subs . add ( client . onDetached ( ( ) => pane . setItems ( [ ] ) ) )
19
19
20
20
let edSubs = new CompositeDisposable ( )
21
- subs . add ( atom . workspace . onDidChangeActiveTextEditor ( ed => {
21
+ subs . add ( atom . workspace . onDidChangeActiveTextEditor ( throttle ( ed => {
22
22
if ( ! ed ) return
23
23
24
24
edSubs . dispose ( )
@@ -60,14 +60,18 @@ export function activate (ink) {
60
60
pane . setItems ( outline )
61
61
} , 300 ) ) )
62
62
63
- updateEditor ( ed ) . then ( outlineItems => {
63
+ updateEditor ( ed , {
64
+ updateSymbols : false
65
+ } ) . then ( outlineItems => {
64
66
outline = handleOutline ( ed , edSubs , outlineItems )
65
67
} )
66
- } ) )
68
+ } , 300 ) ) )
67
69
}
68
70
69
71
// NOTE: update outline and symbols cache all in one go
70
- function updateEditor ( editor ) {
72
+ function updateEditor ( editor , options = {
73
+ updateSymbols : true
74
+ } ) {
71
75
if ( ! client . isActive ( ) ) {
72
76
return new Promise ( ( resolve ) => resolve ( [ ] ) )
73
77
}
@@ -80,6 +84,8 @@ function updateEditor (editor) {
80
84
text,
81
85
mod,
82
86
path,
87
+ // https://github.com/JunoLab/Juno.jl/issues/407
88
+ updateSymbols : options . updateSymbols
83
89
} )
84
90
}
85
91
You can’t perform that action at this time.
0 commit comments