mirror of
https://github.com/amix/vimrc
synced 2025-06-16 09:35:01 +08:00
Updated plugins
This commit is contained in:
@ -1,18 +1,14 @@
|
||||
if has('nvim') && !exists("g:go_term_mode")
|
||||
let g:go_term_mode = 'vsplit'
|
||||
endif
|
||||
|
||||
" new creates a new terminal with the given command. Mode is set based on the
|
||||
" global variable g:go_term_mode, which is by default set to :vsplit
|
||||
function! go#term#new(bang, cmd) abort
|
||||
return go#term#newmode(a:bang, a:cmd, g:go_term_mode)
|
||||
return go#term#newmode(a:bang, a:cmd, go#config#TermMode())
|
||||
endfunction
|
||||
|
||||
" new creates a new terminal with the given command and window mode.
|
||||
function! go#term#newmode(bang, cmd, mode) abort
|
||||
let mode = a:mode
|
||||
if empty(mode)
|
||||
let mode = g:go_term_mode
|
||||
let mode = go#config#TermMode()
|
||||
endif
|
||||
|
||||
let state = {
|
||||
@ -52,8 +48,8 @@ function! go#term#newmode(bang, cmd, mode) abort
|
||||
execute cd . fnameescape(dir)
|
||||
|
||||
" resize new term if needed.
|
||||
let height = get(g:, 'go_term_height', winheight(0))
|
||||
let width = get(g:, 'go_term_width', winwidth(0))
|
||||
let height = go#config#TermHeight()
|
||||
let width = go#config#TermWidth()
|
||||
|
||||
" Adjust the window width or height depending on whether it's a vertical or
|
||||
" horizontal split.
|
||||
@ -94,7 +90,11 @@ function! s:on_exit(job_id, exit_status, event) dict abort
|
||||
|
||||
call win_gotoid(self.winid)
|
||||
|
||||
call go#list#Populate(l:listtype, errors, self.cmd)
|
||||
let title = self.cmd
|
||||
if type(title) == v:t_list
|
||||
let title = join(self.cmd)
|
||||
endif
|
||||
call go#list#Populate(l:listtype, errors, title)
|
||||
call go#list#Window(l:listtype, len(errors))
|
||||
if !self.bang
|
||||
call go#list#JumpToFirst(l:listtype)
|
||||
|
Reference in New Issue
Block a user