From 1792b6a75b337d739dbc6cd16c3091e9f38923cd Mon Sep 17 00:00:00 2001 From: Jason Franklin Date: Sun, 22 Apr 2018 10:19:13 -0400 Subject: [PATCH] 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. --- lib/nerdtree/menu_controller.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/nerdtree/menu_controller.vim b/lib/nerdtree/menu_controller.vim index ae0ee84..b28ca4d 100644 --- a/lib/nerdtree/menu_controller.vim +++ b/lib/nerdtree/menu_controller.vim @@ -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