Skip to content

Commit f60e4fd

Browse files
authored
Merge pull request #1121 from pborzenkov/statusbar-update
Always use full path as statusline target directory
2 parents 5265ad2 + 79fa535 commit f60e4fd

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

autoload/go/coverage.vim

+3-3
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ function s:coverage_job(args)
275275
" autowrite is not enabled for jobs
276276
call go#cmd#autowrite()
277277

278-
let import_path = go#package#ImportPath(expand('%:p:h'))
278+
let status_dir = expand('%:p:h')
279279
function! s:error_info_cb(job, exit_status, data) closure
280280
let status = {
281281
\ 'desc': 'last status',
@@ -287,7 +287,7 @@ function s:coverage_job(args)
287287
let status.state = "failed"
288288
endif
289289

290-
call go#statusline#Update(import_path, status)
290+
call go#statusline#Update(status_dir, status)
291291
endfunction
292292

293293
let a:args.error_info_cb = function('s:error_info_cb')
@@ -308,7 +308,7 @@ function s:coverage_job(args)
308308
let jobdir = fnameescape(expand("%:p:h"))
309309
execute cd . jobdir
310310

311-
call go#statusline#Update(import_path, {
311+
call go#statusline#Update(status_dir, {
312312
\ 'desc': "current status",
313313
\ 'type': "coverage",
314314
\ 'state': "started",

autoload/go/guru.vim

+3-3
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ function! s:async_guru(args) abort
152152
return
153153
endif
154154

155-
let import_path = go#package#ImportPath(expand('%:p:h'))
155+
let status_dir = expand('%:p:h')
156156
let statusline_type = printf("%s", a:args.mode)
157157

158158
if !has_key(a:args, 'disable_progress')
@@ -188,7 +188,7 @@ function! s:async_guru(args) abort
188188
let status.state = "failed"
189189
endif
190190

191-
call go#statusline#Update(import_path, status)
191+
call go#statusline#Update(status_dir, status)
192192

193193
if has_key(a:args, 'custom_parse')
194194
call a:args.custom_parse(l:info.exitval, out)
@@ -208,7 +208,7 @@ function! s:async_guru(args) abort
208208
let l:start_options.in_name = l:tmpname
209209
endif
210210

211-
call go#statusline#Update(import_path, {
211+
call go#statusline#Update(status_dir, {
212212
\ 'desc': "current status",
213213
\ 'type': statusline_type,
214214
\ 'state': "analysing",

autoload/go/rename.vim

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function s:rename_job(args)
6363
call add(messages, a:msg)
6464
endfunction
6565

66-
let import_path = go#package#ImportPath(expand('%:p:h'))
66+
let status_dir = expand('%:p:h')
6767

6868
function! s:close_cb(chan) closure
6969
let l:job = ch_getjob(a:chan)
@@ -79,7 +79,7 @@ function s:rename_job(args)
7979
let status.state = "failed"
8080
endif
8181

82-
call go#statusline#Update(import_path, status)
82+
call go#statusline#Update(status_dir, status)
8383

8484
call s:parse_errors(l:info.exitval, a:args.bang, messages)
8585
endfunction
@@ -93,7 +93,7 @@ function s:rename_job(args)
9393
let old_gopath = $GOPATH
9494
let $GOPATH = go#path#Detect()
9595

96-
call go#statusline#Update(import_path, {
96+
call go#statusline#Update(status_dir, {
9797
\ 'desc': "current status",
9898
\ 'type': "gorename",
9999
\ 'state': "started",

0 commit comments

Comments
 (0)