Skip to content

Commit e98d8c5

Browse files
committed
jobs: improve progress echo
* Only echo status when g:go_echo_command_info is set. * Echo status when starting a job.
1 parent 491f98c commit e98d8c5

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

autoload/go/job.vim

+11-9
Original file line numberDiff line numberDiff line change
@@ -105,22 +105,19 @@ function! go#job#Options(args)
105105
endfunction
106106

107107
function state.show_status(job, exit_status) dict
108-
if go#config#EchoCommandInfo() && self.for != '_'
109-
let prefix = ""
110-
if self.statustype != ''
111-
let prefix = '[' . self.statustype . '] '
112-
endif
108+
if self.statustype == ''
109+
return
110+
endif
111+
112+
if go#config#EchoCommandInfo()
113+
let prefix = '[' . self.statustype . '] '
113114
if a:exit_status == 0
114115
call go#util#EchoSuccess(prefix . "SUCCESS")
115116
else
116117
call go#util#EchoError(prefix . "FAIL")
117118
endif
118119
endif
119120

120-
if self.statustype == ''
121-
return
122-
endif
123-
124121
let status = {
125122
\ 'desc': 'last status',
126123
\ 'type': self.statustype,
@@ -146,6 +143,11 @@ function! go#job#Options(args)
146143
endif
147144

148145
function! s:start(args) dict
146+
if go#config#EchoCommandInfo()
147+
let prefix = '[' . self.statustype . '] '
148+
call go#util#EchoSuccess(prefix . "dispatched")
149+
endif
150+
149151
if self.statustype != ''
150152
let status = {
151153
\ 'desc': 'current status',

0 commit comments

Comments
 (0)