You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function! s:UI._stripMarkup(line, removeLeadingSpaces)
let line = a:line
"remove the tree parts and the leading space
let line = substitute (line, g:NERDTreeUI.MarkupReg(),"","")
"strip off any read only flag
let line = substitute (line, ' \[RO\]', "","")
"strip off any bookmark flags
let line = substitute (line, ' {[^}]*}', "","")
"strip off any executable flags
let line = substitute (line, '*\ze\($\| \)', "","")
"strip off any generic flags
let line = substitute (line, '\[[^]]*\]', "","")
let wasdir = 0
if line =~# '/$'
let wasdir = 1
endif
let line = substitute (line,' -> .*',"","") " remove link to
if wasdir ==# 1
let line = substitute (line, '/\?$', '/', "")
endif
if a:removeLeadingSpaces
let line = substitute (line, '^ *', '', '')
endif
return line
endfunction
I guess the changes that should be made to make this work would be huge (because the filename should not be extracted from the view layer, but from an other layer)
The text was updated successfully, but these errors were encountered:
netei
changed the title
Not able to do anything with file named "[test].md"
Not able to do anything with file named "[test].md" (m, o , enter do not work)
Sep 25, 2015
This issue is directly related to #680. It is a confirmed bug. I independently discovered the problem with _stripMarkup() previously, and this user has reached the same conclusion.
Whenever you name a file
[test].md
, it is not possible to do anything with it inside NerdTree (pressing m and any other keys has absolutely no effect)This seems to come from the function UI._stripMarkup, specifically this line : https://github.com/scrooloose/nerdtree/blob/8c7534bc9e1d0c2f18bf94c1440c4ae6b102b5d6/lib/nerdtree/ui.vim#L359
I guess the changes that should be made to make this work would be huge (because the filename should not be extracted from the view layer, but from an other layer)
The text was updated successfully, but these errors were encountered: