Don't jump do the tagbar window on TagbarOpen if already open

This commit is contained in:
Jan Larres 2011-11-03 04:29:12 +13:00
parent 4c907e56c1
commit 960332efb1

View File

@ -1374,12 +1374,9 @@ endfunction
" s:OpenWindow() {{{2
function! s:OpenWindow(autoclose)
" If the tagbar window is already open jump to it
" If the tagbar window is already open don't do anything
let tagbarwinnr = bufwinnr('__Tagbar__')
if tagbarwinnr != -1
if winnr() != tagbarwinnr
execute tagbarwinnr . 'wincmd w'
endif
return
endif