mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-25 09:41:03 +08:00
Simplify and make similar statements more similarer
This commit is contained in:
parent
450abd1820
commit
c3d7c141bb
|
@ -104,8 +104,8 @@ function! s:TreeDirNode.displayString()
|
|||
endfor
|
||||
|
||||
" Select the appropriate open/closed status indicator symbol.
|
||||
let l:padding = g:NERDTreeDirArrowExpandable ==# '' ? '' : ' '
|
||||
let l:symbol = (l:cascade[-1].isOpen ? g:NERDTreeDirArrowCollapsible : g:NERDTreeDirArrowExpandable ) . l:padding
|
||||
let l:symbol = (l:cascade[-1].isOpen ? g:NERDTreeDirArrowCollapsible : g:NERDTreeDirArrowExpandable )
|
||||
let l:symbol .= (g:NERDTreeDirArrowExpandable ==# '' ? '' : ' ')
|
||||
let l:flags = l:cascade[-1].path.flagSet.renderToString()
|
||||
|
||||
return l:symbol . l:flags . l:label
|
||||
|
|
|
@ -321,9 +321,7 @@ function! s:TreeFileNode._renderToString(depth, drawText)
|
|||
if a:drawText ==# 1
|
||||
|
||||
let treeParts = repeat(' ', a:depth - 1)
|
||||
if !self.path.isDirectory && g:NERDTreeDirArrowExpandable !=# ''
|
||||
let treeParts .= ' '
|
||||
endif
|
||||
let treeParts .= (self.path.isDirectory || g:NERDTreeDirArrowExpandable ==# '' ? '' : ' ')
|
||||
|
||||
let line = treeParts . self.displayString()
|
||||
let output = output . line . "\n"
|
||||
|
|
Loading…
Reference in New Issue
Block a user