1
0
mirror of https://github.com/amix/vimrc synced 2025-07-09 02:25:00 +08:00

Updated plugins

This commit is contained in:
Amir Salihefendic
2019-08-22 17:36:17 +02:00
parent 6711ae6453
commit 3aefdbd21a
244 changed files with 9486 additions and 3395 deletions

View File

@ -96,6 +96,13 @@ function! s:on_stdout(job_id, data, event) dict abort
endfunction
function! s:on_exit(job_id, exit_status, event) dict abort
" change to directory where test were run. if we do not do this
" the quickfix items will have the incorrect paths.
" see: https://github.com/fatih/vim-go/issues/2400
let l:cd = exists('*haslocaldir') && haslocaldir() ? 'lcd ' : 'cd '
let l:dir = getcwd()
execute l:cd . fnameescape(expand("%:p:h"))
let l:winid = win_getid(winnr())
call win_gotoid(self.winid)
let l:listtype = go#list#Type("_term")
@ -130,8 +137,10 @@ function! s:on_exit(job_id, exit_status, event) dict abort
endif
" close terminal; we don't need it anymore
call win_gotoid(self.termwinid)
close!
if go#config#TermCloseOnExit()
call win_gotoid(self.termwinid)
close!
endif
if self.bang
call win_gotoid(l:winid)
@ -140,6 +149,21 @@ function! s:on_exit(job_id, exit_status, event) dict abort
call win_gotoid(self.winid)
call go#list#JumpToFirst(l:listtype)
" change back to original working directory
execute l:cd l:dir
endfunction
function! go#term#ToggleCloseOnExit() abort
if go#config#TermCloseOnExit()
call go#config#SetTermCloseOnExit(0)
call go#util#EchoProgress("term close on exit disabled")
return
endif
call go#config#SetTermCloseOnExit(1)
call go#util#EchoProgress("term close on exit enabled")
return
endfunction
" restore Vi compatibility settings