Clear output when the NERDTree menu is aborted

Previously, exiting the NERDTree menu with "Ctrl-C" or "Esc" would
leave the last line of the menu visible.  We can avoid this by
redrawing the screen when the menu is aborted in this manner.
This commit is contained in:
Jason Franklin 2018-04-22 10:19:13 -04:00
parent 727770147a
commit 1792b6a75b

View File

@ -33,6 +33,11 @@ function! s:MenuController.showMenu()
endwhile
finally
call self._restoreOptions()
" Redraw when "Ctrl-C" or "Esc" is received.
if !l:done || self.selection == -1
redraw!
endif
endtry
if self.selection != -1