Use different arrow characters for compatibility.
This commit is contained in:
parent
3b98a7fcae
commit
f6cad7e957
@ -98,7 +98,7 @@ endfunction
|
|||||||
"FUNCTION: nerdtree#treeMarkupReg(dir) {{{2
|
"FUNCTION: nerdtree#treeMarkupReg(dir) {{{2
|
||||||
function! nerdtree#treeMarkupReg()
|
function! nerdtree#treeMarkupReg()
|
||||||
if g:NERDTreeDirArrows
|
if g:NERDTreeDirArrows
|
||||||
return '^\([▾▸] \| \+[▾▸] \| \+\)'
|
return '^\([▼▶] \| \+[▼▶] \| \+\)'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
return '^[ `|]*[\-+~]'
|
return '^[ `|]*[\-+~]'
|
||||||
|
@ -383,13 +383,13 @@ function! s:TreeFileNode._renderToString(depth, drawText, vertMap, isLastChild)
|
|||||||
if self.path.isDirectory
|
if self.path.isDirectory
|
||||||
if self.isOpen
|
if self.isOpen
|
||||||
if g:NERDTreeDirArrows
|
if g:NERDTreeDirArrows
|
||||||
let treeParts = treeParts . '▾ '
|
let treeParts = treeParts . '▼ '
|
||||||
else
|
else
|
||||||
let treeParts = treeParts . '~'
|
let treeParts = treeParts . '~'
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
if g:NERDTreeDirArrows
|
if g:NERDTreeDirArrows
|
||||||
let treeParts = treeParts . '▸ '
|
let treeParts = treeParts . '▶ '
|
||||||
else
|
else
|
||||||
let treeParts = treeParts . '+'
|
let treeParts = treeParts . '+'
|
||||||
endif
|
endif
|
||||||
|
@ -51,7 +51,7 @@ function! s:UI.getPath(ln)
|
|||||||
|
|
||||||
if !g:NERDTreeDirArrows
|
if !g:NERDTreeDirArrows
|
||||||
" in case called from outside the tree
|
" in case called from outside the tree
|
||||||
if line !~# '^ *[|`▸▾ ]' || line =~# '^$'
|
if line !~# '^ *[|`▶▼ ]' || line =~# '^$'
|
||||||
return {}
|
return {}
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
@ -159,9 +159,9 @@ endfunction
|
|||||||
|
|
||||||
"FUNCTION: s:UI._indentLevelFor(line) {{{2
|
"FUNCTION: s:UI._indentLevelFor(line) {{{2
|
||||||
function! s:UI._indentLevelFor(line)
|
function! s:UI._indentLevelFor(line)
|
||||||
let level = match(a:line, '[^ \-+~▸▾`|]') / nerdtree#treeWid()
|
let level = match(a:line, '[^ \-+~▶▼`|]') / nerdtree#treeWid()
|
||||||
" check if line includes arrows
|
" check if line includes arrows
|
||||||
if match(a:line, '[▸▾]') > -1
|
if match(a:line, '[▶▼]') > -1
|
||||||
" decrement level as arrow uses 3 ascii chars
|
" decrement level as arrow uses 3 ascii chars
|
||||||
let level = level - 1
|
let level = level - 1
|
||||||
endif
|
endif
|
||||||
|
@ -23,12 +23,12 @@ syn match NERDTreeLinkDir #.*/ ->#me=e-3 containedin=NERDTreeDir
|
|||||||
syn match NERDTreeDirSlash #/# containedin=NERDTreeDir
|
syn match NERDTreeDirSlash #/# containedin=NERDTreeDir
|
||||||
|
|
||||||
if g:NERDTreeDirArrows
|
if g:NERDTreeDirArrows
|
||||||
syn match NERDTreeClosable #▾# containedin=NERDTreeDir,NERDTreeFile
|
syn match NERDTreeClosable #▼# containedin=NERDTreeDir,NERDTreeFile
|
||||||
syn match NERDTreeOpenable #▸# containedin=NERDTreeDir,NERDTreeFile
|
syn match NERDTreeOpenable #▶# containedin=NERDTreeDir,NERDTreeFile
|
||||||
|
|
||||||
syn match NERDTreeDir #[^▾▸ ].*/#
|
syn match NERDTreeDir #[^▼▶ ].*/#
|
||||||
syn match NERDTreeExecFile #^ .*\*\($\| \)# contains=NERDTreeRO,NERDTreeBookmark
|
syn match NERDTreeExecFile #^ .*\*\($\| \)# contains=NERDTreeRO,NERDTreeBookmark
|
||||||
syn match NERDTreeFile #^[^"\.▾▸] *[^▾▸]*# contains=NERDTreeLink,NERDTreeRO,NERDTreeBookmark,NERDTreeExecFile
|
syn match NERDTreeFile #^[^"\.▼▶] *[^▼▶]*# contains=NERDTreeLink,NERDTreeRO,NERDTreeBookmark,NERDTreeExecFile
|
||||||
|
|
||||||
"highlighting for readonly files
|
"highlighting for readonly files
|
||||||
syn match NERDTreeRO # *\zs.*\ze \[RO\]# contains=NERDTreeIgnore,NERDTreeBookmark,NERDTreeFile
|
syn match NERDTreeRO # *\zs.*\ze \[RO\]# contains=NERDTreeIgnore,NERDTreeBookmark,NERDTreeFile
|
||||||
|
Loading…
Reference in New Issue
Block a user