Add a sanity check in case someone closes the preview window.
This commit is contained in:
parent
f2f847d973
commit
9514fd457e
@ -100,10 +100,11 @@ endfunction
|
|||||||
|
|
||||||
function! s:GundoToggle()
|
function! s:GundoToggle()
|
||||||
if expand('%') == "__Gundo__"
|
if expand('%') == "__Gundo__"
|
||||||
" TODO: Add some sanity checks here.
|
|
||||||
quit
|
|
||||||
exe bufwinnr(bufnr('__Gundo_Preview__')) . "wincmd w"
|
|
||||||
quit
|
quit
|
||||||
|
if bufwinnr(bufnr('__Gundo_Preview__')) != -1
|
||||||
|
exe bufwinnr(bufnr('__Gundo_Preview__')) . "wincmd w"
|
||||||
|
quit
|
||||||
|
endif
|
||||||
exe bufwinnr(g:gundo_target_n) . "wincmd w"
|
exe bufwinnr(g:gundo_target_n) . "wincmd w"
|
||||||
else
|
else
|
||||||
if expand('%') != "__Gundo_Preview__"
|
if expand('%') != "__Gundo_Preview__"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user