From 702a88956bfc24a190f78bcfa98e387db6320160 Mon Sep 17 00:00:00 2001 From: Martin Grenfell Date: Tue, 1 Mar 2011 11:03:05 +1300 Subject: [PATCH] remove '.. (up a dir)' when NERDTreeMinimalUI is set Shortening this line doesnt add anything to the UI (functionally speaking), but removing frees up an extra line. Anyone who sets NERDTreeMinimalUI probably uses the u/U mappings anyway. --- plugin/NERD_tree.vim | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index 1321a17..4a1d1e2 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -150,11 +150,7 @@ let s:NERDTreeBufName = 'NERD_tree_' let s:tree_wid = 2 let s:tree_markup_reg = '^[ `|]*[\-+~▾▸ ]*' -if g:NERDTreeMinimalUI == 0 - let s:tree_up_dir_line = '.. (up a dir)' -else - let s:tree_up_dir_line = '..' -endif +let s:tree_up_dir_line = '.. (up a dir)' "the number to add to the nerd tree buffer name to make the buf name unique let s:next_buffer_number = 1 @@ -3313,8 +3309,10 @@ function! s:renderView() endif "add the 'up a dir' line - call setline(line(".")+1, s:tree_up_dir_line) - call cursor(line(".")+1, col(".")) + if !g:NERDTreeMinimalUI + call setline(line(".")+1, s:tree_up_dir_line) + call cursor(line(".")+1, col(".")) + endif "draw the header line let header = b:NERDTreeRoot.path.str({'format': 'UI', 'truncateTo': winwidth(0)})