@@ -114,13 +114,6 @@ function! s:async_guru(args) abort
114
114
return
115
115
endif
116
116
117
- if ! has_key (a: args , ' disable_progress' )
118
- if a: args .needs_scope
119
- call go#util#EchoProgress (" analysing with scope " . result.scope .
120
- \ " (see ':help go-guru-scope' if this doesn't work)..." )
121
- endif
122
- endif
123
-
124
117
let state = {
125
118
\ ' mode' : a: args .mode ,
126
119
\ ' parse' : get (a: args , ' custom_parse' , funcref (" s:parse_guru_output" ))
@@ -141,6 +134,10 @@ function! s:async_guru(args) abort
141
134
\ ' complete' : state .complete ,
142
135
\ }
143
136
137
+ if has_key (a: args , ' disable_progress' )
138
+ let opts.statustype = ' '
139
+ endif
140
+
144
141
let opts = go#job#Options (l: opts )
145
142
146
143
if has_key (result, ' stdin_content' )
@@ -151,6 +148,11 @@ function! s:async_guru(args) abort
151
148
endif
152
149
153
150
call go#job#Start (result.cmd, opts)
151
+
152
+ if a: args .needs_scope && go#config#EchoCommandInfo () && ! has_key (a: args , ' disable_progress' )
153
+ call go#util#EchoProgress (" analysing with scope " . result.scope .
154
+ \ " (see ':help go-guru-scope' if this doesn't work)..." )
155
+ endif
154
156
endfunc
155
157
156
158
" run_guru runs the given guru argument
@@ -315,18 +317,13 @@ function! go#guru#DescribeInfo(showstatus) abort
315
317
316
318
let args = {
317
319
\ ' mode' : ' describe' ,
318
- \ ' statustype' : ' ' ,
319
320
\ ' format' : ' json' ,
320
321
\ ' selected' : -1 ,
321
322
\ ' needs_scope' : 0 ,
322
323
\ ' custom_parse' : function (' s:info' ),
323
324
\ ' disable_progress' : 1 ,
324
325
\ }
325
326
326
- if a: showstatus
327
- let args .statustype = args .mode
328
- endif
329
-
330
327
call s: run_guru (args )
331
328
endfunction
332
329
@@ -426,14 +423,13 @@ function! go#guru#SameIds(showstatus) abort
426
423
427
424
let args = {
428
425
\ ' mode' : ' what' ,
429
- \ ' statustype' : ' ' ,
430
426
\ ' format' : ' json' ,
431
427
\ ' selected' : -1 ,
432
428
\ ' needs_scope' : 0 ,
433
429
\ ' custom_parse' : function (' s:same_ids_highlight' ),
434
430
\ }
435
- if a: showstatus
436
- let args .statustype = args . mode
431
+ if ! a: showstatus
432
+ let args .disable_progress = 1
437
433
endif
438
434
439
435
call s: run_guru (args )
0 commit comments