1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 14:00:06 +08:00

Silent jump to buffer

This commit is contained in:
wsdjeg 2017-10-04 15:46:45 +08:00
parent b16837623d
commit d61a5118e7
2 changed files with 3 additions and 1 deletions

View File

@ -188,7 +188,7 @@ endfunction
function! SpaceVim#layers#core#tabline#jump(id) abort function! SpaceVim#layers#core#tabline#jump(id) abort
if len(s:buffers) >= a:id if len(s:buffers) >= a:id
let bid = s:buffers[a:id - 1] let bid = s:buffers[a:id - 1]
exe 'b' . bid exe 'silent b' . bid
endif endif
endfunction endfunction

View File

@ -42,6 +42,7 @@ let s:shell_win_nr = 0
function! s:open_default_shell() abort function! s:open_default_shell() abort
if s:shell_win_nr != 0 && getwinvar(s:shell_win_nr, '&buftype') ==# 'terminal' && &buftype !=# 'terminal' if s:shell_win_nr != 0 && getwinvar(s:shell_win_nr, '&buftype') ==# 'terminal' && &buftype !=# 'terminal'
exe s:shell_win_nr . 'wincmd w' exe s:shell_win_nr . 'wincmd w'
startinsert
return return
endif endif
if &buftype ==# 'terminal' if &buftype ==# 'terminal'
@ -64,6 +65,7 @@ function! s:open_default_shell() abort
exe 'te' exe 'te'
let s:shell_win_nr = winnr() let s:shell_win_nr = winnr()
let w:shell_layer_win = 1 let w:shell_layer_win = 1
startinsert
else else
echo ':terminal is not supported in this version' echo ':terminal is not supported in this version'
endif endif