From 849fcbcd5a25cc3b782feafdb3df0b0f681a2d6f Mon Sep 17 00:00:00 2001 From: Jan Larres Date: Fri, 14 Oct 2011 17:33:52 +1300 Subject: [PATCH] Simplify some wincmd calls --- autoload/tagbar.vim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index 15b7607..ed5fa2e 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -821,11 +821,11 @@ function! s:RestoreSession() call s:InitWindow(g:tagbar_autoclose) " Leave the Tagbar window and come back so the update event gets triggered - execute 'wincmd p' + wincmd p execute tagbarwinnr . 'wincmd w' if !in_tagbar - execute 'wincmd p' + wincmd p endif endfunction @@ -1398,7 +1398,7 @@ function! s:OpenWindow(autoclose) call s:InitWindow(a:autoclose) - execute 'wincmd p' + wincmd p " Jump back to the tagbar window if autoclose or autofocus is set. Can't " just stay in it since it wouldn't trigger the update event @@ -2315,7 +2315,7 @@ function! s:JumpToTag(stay_in_tagbar) " This elaborate construct will try to switch to the correct " buffer/window; if the buffer isn't currently shown in a window it will " open it in the first window with a non-special buffer in it - execute 'wincmd p' + wincmd p let filebufnr = bufnr(taginfo.fileinfo.fpath) if bufnr('%') != filebufnr let filewinnr = bufwinnr(filebufnr) @@ -2333,7 +2333,7 @@ function! s:JumpToTag(stay_in_tagbar) " To make ctrl-w_p work we switch between the Tagbar window and the " correct window once execute tagbarwinnr . 'wincmd w' - execute 'wincmd p' + wincmd p endif " Mark current position so it can be jumped back to