mirror of
https://github.com/gryf/tagbar.git
synced 2026-10-06 05:20:41 +02:00
Verify that window number is valid before switching to it
This commit is contained in:
1 parent
9a75c110b7
commit
d61ca60d1c
1 file changed
+7
-2
+7
-2
@@ -4030,10 +4030,15 @@ function! s:QuitIfOnlyWindow() abort
|
||||
endif
|
||||
endif
|
||||
|
||||
if prevwinnr != tagbarwinnr
|
||||
" Check that prevwinnr is still a valid window number
|
||||
if prevwinnr != tagbarwinnr && prevwinnr <= winnr('$')
|
||||
call s:goto_win(prevwinnr, 1)
|
||||
endif
|
||||
call s:goto_win(curwinnr, 1)
|
||||
|
||||
" Check that curwinnr is still a valid window number
|
||||
if curwinnr <= winnr('$')
|
||||
call s:goto_win(curwinnr, 1)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" s:NextNormalWindow() {{{2
|
||||
|
||||
Reference in new issue
Block a user