Escape the DirArrow strings in substitute function.

This commit is contained in:
Phil Runninger (mac) 2019-04-23 10:26:30 -04:00
parent 9226eab2a8
commit 3c06335782

View File

@ -282,7 +282,7 @@ endfunction
function! s:UI._indentLevelFor(line)
" Replace multi-character DirArrows with a single space so the
" indentation calculation doesn't get messed up.
let l:line = substitute(substitute(a:line, g:NERDTreeDirArrowExpandable, ' ', ''), g:NERDTreeDirArrowCollapsible, ' ', '')
let l:line = substitute(substitute(a:line, '\V'.g:NERDTreeDirArrowExpandable, ' ', ''), '\V'.g:NERDTreeDirArrowCollapsible, ' ', '')
let leadChars = match(l:line, '\M\[^ ]')
return leadChars / s:UI.IndentWid()
endfunction