Skip to content

Commit 702a889

Browse files
committed
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.
1 parent fad6f06 commit 702a889

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

plugin/NERD_tree.vim

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,7 @@ let s:NERDTreeBufName = 'NERD_tree_'
150150

151151
let s:tree_wid = 2
152152
let s:tree_markup_reg = '^[ `|]*[\-+~▾▸ ]*'
153-
if g:NERDTreeMinimalUI == 0
154-
let s:tree_up_dir_line = '.. (up a dir)'
155-
else
156-
let s:tree_up_dir_line = '..'
157-
endif
153+
let s:tree_up_dir_line = '.. (up a dir)'
158154

159155
"the number to add to the nerd tree buffer name to make the buf name unique
160156
let s:next_buffer_number = 1
@@ -3313,8 +3309,10 @@ function! s:renderView()
33133309
endif
33143310

33153311
"add the 'up a dir' line
3316-
call setline(line(".")+1, s:tree_up_dir_line)
3317-
call cursor(line(".")+1, col("."))
3312+
if !g:NERDTreeMinimalUI
3313+
call setline(line(".")+1, s:tree_up_dir_line)
3314+
call cursor(line(".")+1, col("."))
3315+
endif
33183316

33193317
"draw the header line
33203318
let header = b:NERDTreeRoot.path.str({'format': 'UI', 'truncateTo': winwidth(0)})

0 commit comments

Comments
 (0)