mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-22 10:55:15 +08:00
If arrows are empty strings, don't print their trailing spaces.
This commit is contained in:
parent
8c48845d11
commit
26333ceeab
|
@ -104,16 +104,11 @@ function! s:TreeDirNode.displayString()
|
|||
endfor
|
||||
|
||||
" Select the appropriate open/closed status indicator symbol.
|
||||
if l:cascade[-1].isOpen
|
||||
let l:symbol = g:NERDTreeDirArrowCollapsible
|
||||
else
|
||||
let l:symbol = g:NERDTreeDirArrowExpandable
|
||||
endif
|
||||
|
||||
let l:padding = g:NERDTreeDirArrowExpandable == '' ? '' : ' '
|
||||
let l:symbol = (l:cascade[-1].isOpen ? g:NERDTreeDirArrowCollapsible : g:NERDTreeDirArrowExpandable ) . l:padding
|
||||
let l:flags = l:cascade[-1].path.flagSet.renderToString()
|
||||
|
||||
let l:result = l:symbol . ' ' . l:flags . l:label
|
||||
return l:result
|
||||
return l:symbol . l:flags . l:label
|
||||
endfunction
|
||||
|
||||
" FUNCTION: TreeDirNode.findNode(path) {{{1
|
||||
|
|
|
@ -321,13 +321,11 @@ function! s:TreeFileNode._renderToString(depth, drawText)
|
|||
if a:drawText ==# 1
|
||||
|
||||
let treeParts = repeat(' ', a:depth - 1)
|
||||
|
||||
if !self.path.isDirectory
|
||||
let treeParts = treeParts . ' '
|
||||
if !self.path.isDirectory && g:NERDTreeDirArrowExpandable != ''
|
||||
let treeParts .= ' '
|
||||
endif
|
||||
|
||||
let line = treeParts . self.displayString()
|
||||
|
||||
let output = output . line . "\n"
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user