From d61a5118e773cb130ad87ab6e70242cb860246c3 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Wed, 4 Oct 2017 15:46:45 +0800 Subject: [PATCH] Silent jump to buffer --- autoload/SpaceVim/layers/core/tabline.vim | 2 +- autoload/SpaceVim/layers/shell.vim | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/autoload/SpaceVim/layers/core/tabline.vim b/autoload/SpaceVim/layers/core/tabline.vim index bb32ce357..04cfe0362 100644 --- a/autoload/SpaceVim/layers/core/tabline.vim +++ b/autoload/SpaceVim/layers/core/tabline.vim @@ -188,7 +188,7 @@ endfunction function! SpaceVim#layers#core#tabline#jump(id) abort if len(s:buffers) >= a:id let bid = s:buffers[a:id - 1] - exe 'b' . bid + exe 'silent b' . bid endif endfunction diff --git a/autoload/SpaceVim/layers/shell.vim b/autoload/SpaceVim/layers/shell.vim index 387b01e94..89404510f 100644 --- a/autoload/SpaceVim/layers/shell.vim +++ b/autoload/SpaceVim/layers/shell.vim @@ -42,6 +42,7 @@ let s:shell_win_nr = 0 function! s:open_default_shell() abort if s:shell_win_nr != 0 && getwinvar(s:shell_win_nr, '&buftype') ==# 'terminal' && &buftype !=# 'terminal' exe s:shell_win_nr . 'wincmd w' + startinsert return endif if &buftype ==# 'terminal' @@ -64,6 +65,7 @@ function! s:open_default_shell() abort exe 'te' let s:shell_win_nr = winnr() let w:shell_layer_win = 1 + startinsert else echo ':terminal is not supported in this version' endif