Fix vint errors: Use robust operators ==# and !=#

This commit is contained in:
Phil Runninger 2020-02-03 02:28:53 -05:00
parent 961c3571c4
commit 6d3743549c
3 changed files with 3 additions and 3 deletions

View File

@ -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()

View File

@ -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

View File

@ -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, '~]\-')