commit 702a88956bfc24a190f78bcfa98e387db6320160
parent fad6f06ace98628bbfb0011fe9597ebecc9feb83
Author: Martin Grenfell <martin.grenfell@gmail.com>
Date: Tue, 1 Mar 2011 11:03:05 +1300
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.
Diffstat:
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git 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)})