mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-29 04:33:40 +08:00
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