diff --git a/plugin/tagbar.vim b/plugin/tagbar.vim index 47772ab..bf1c5e4 100644 --- a/plugin/tagbar.vim +++ b/plugin/tagbar.vim @@ -833,13 +833,10 @@ function! s:OpenWindow(autoclose) " If the tagbar window is already open jump to it let tagbarwinnr = bufwinnr('__Tagbar__') - if tagbarwinnr != -1 && winnr() != tagbarwinnr - execute tagbarwinnr . 'wincmd w' - return - endif - - " If we're in the tagbar window don't do anything - if winnr() == tagbarwinnr + if tagbarwinnr != -1 + if winnr() != tagbarwinnr + execute tagbarwinnr . 'wincmd w' + endif return endif