mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-22 11:32:25 +08:00
Fix vint errors: Use robust operators ==# and !=#
This commit is contained in:
parent
961c3571c4
commit
6d3743549c
|
@ -104,7 +104,7 @@ function! s:TreeDirNode.displayString()
|
|||
endfor
|
||||
|
||||
" Select the appropriate open/closed status indicator symbol.
|
||||
let l:padding = g:NERDTreeDirArrowExpandable == '' ? '' : ' '
|
||||
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()
|
||||
|
||||
|
|
|
@ -321,7 +321,7 @@ function! s:TreeFileNode._renderToString(depth, drawText)
|
|||
if a:drawText ==# 1
|
||||
|
||||
let treeParts = repeat(' ', a:depth - 1)
|
||||
if !self.path.isDirectory && g:NERDTreeDirArrowExpandable != ''
|
||||
if !self.path.isDirectory && g:NERDTreeDirArrowExpandable !=# ''
|
||||
let treeParts .= ' '
|
||||
endif
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ syn match NERDTreeLinkDir #.*/ ->#me=e-3 containedin=NERDTreeDir
|
|||
"highlighing for directory nodes and file nodes
|
||||
syn match NERDTreeDirSlash #/# containedin=NERDTreeDir
|
||||
|
||||
if g:NERDTreeDirArrowExpandable != ''
|
||||
if g:NERDTreeDirArrowExpandable !=# ''
|
||||
exec 'syn match NERDTreeClosable #' . escape(g:NERDTreeDirArrowCollapsible, '~') . '\ze .*/# containedin=NERDTreeDir,NERDTreeFile'
|
||||
exec 'syn match NERDTreeOpenable #' . escape(g:NERDTreeDirArrowExpandable, '~') . '\ze .*/# containedin=NERDTreeDir,NERDTreeFile'
|
||||
let s:dirArrows = escape(g:NERDTreeDirArrowCollapsible, '~]\-').escape(g:NERDTreeDirArrowExpandable, '~]\-')
|
||||
|
|
Loading…
Reference in New Issue
Block a user