Escape the DirArrow strings in substitute function.
This commit is contained in:
parent
9226eab2a8
commit
3c06335782
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user