mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-22 11:54:57 +08:00
Use fnameescape to quote filenames for :badd.
This commit is contained in:
parent
2e2b649232
commit
916f6b8f8f
|
@ -74,7 +74,7 @@ endfunction
|
|||
function! s:promptToRenameBuffer(bufnum, msg, newFileName)
|
||||
echo a:msg
|
||||
if g:NERDTreeAutoDeleteBuffer || nr2char(getchar()) ==# 'y'
|
||||
let quotedFileName = "'" . a:newFileName . "'"
|
||||
let quotedFileName = fnameescape(a:newFilename)
|
||||
" 1. ensure that a new buffer is loaded
|
||||
exec "badd " . quotedFileName
|
||||
" 2. ensure that all windows which display the just deleted filename
|
||||
|
|
Loading…
Reference in New Issue
Block a user