Skip to content

Commit

Permalink
Fixed an error message during exiting undotree.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbbill committed Jan 22, 2019
1 parent 9172c17 commit 63734df
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions autoload/undotree.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1320,15 +1320,19 @@ endfunction

function! s:exitIfLast() abort
let num = 0
if t:undotree.IsVisible()
if exists('t:undotree') && t:undotree.IsVisible()
let num = num + 1
endif
if t:diffpanel.IsVisible()
if exists('t:diffpanel') && t:diffpanel.IsVisible()
let num = num + 1
endif
if winnr('$') == num
call t:undotree.Hide()
call t:diffpanel.Hide()
if exists('t:undotree')
call t:undotree.Hide()
endif
if exists('t:diffpanel')
call t:diffpanel.Hide()
endif
endif
endfunction

Expand Down

0 comments on commit 63734df

Please sign in to comment.