diff --git a/lib/nerdtree/ui.vim b/lib/nerdtree/ui.vim index ff85589..6ff9878 100644 --- a/lib/nerdtree/ui.vim +++ b/lib/nerdtree/ui.vim @@ -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