nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit 3c0633578281463638235597d8208612544606ae
parent 9226eab2a873400e0debecfb2a344ae88731a5f0
Author: Phil Runninger (mac) <prunninger@vhtcx.com>
Date:   Tue, 23 Apr 2019 10:26:30 -0400

Escape the DirArrow strings in substitute function.

Diffstat:
Mlib/nerdtree/ui.vim | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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