Skip to content

Commit

Permalink
Merge pull request #1121 from pborzenkov/statusbar-update
Browse files Browse the repository at this point in the history
Always use full path as statusline target directory
  • Loading branch information
fatih authored Nov 24, 2016
2 parents 5265ad2 + 79fa535 commit f60e4fd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions autoload/go/coverage.vim
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ function s:coverage_job(args)
" autowrite is not enabled for jobs
call go#cmd#autowrite()

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

call go#statusline#Update(import_path, status)
call go#statusline#Update(status_dir, status)
endfunction

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

call go#statusline#Update(import_path, {
call go#statusline#Update(status_dir, {
\ 'desc': "current status",
\ 'type': "coverage",
\ 'state': "started",
Expand Down
6 changes: 3 additions & 3 deletions autoload/go/guru.vim
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ function! s:async_guru(args) abort
return
endif

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

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

call go#statusline#Update(import_path, status)
call go#statusline#Update(status_dir, status)

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

call go#statusline#Update(import_path, {
call go#statusline#Update(status_dir, {
\ 'desc': "current status",
\ 'type': statusline_type,
\ 'state': "analysing",
Expand Down
6 changes: 3 additions & 3 deletions autoload/go/rename.vim
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function s:rename_job(args)
call add(messages, a:msg)
endfunction

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

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

call go#statusline#Update(import_path, status)
call go#statusline#Update(status_dir, status)

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

call go#statusline#Update(import_path, {
call go#statusline#Update(status_dir, {
\ 'desc': "current status",
\ 'type': "gorename",
\ 'state': "started",
Expand Down

0 comments on commit f60e4fd

Please sign in to comment.