mirror of
https://github.com/preservim/nerdtree.git
synced 2025-01-31 07:35:00 +08:00
Merge pull request #316 from ZeroProbability/master
Issue 315 - Incorrect buffer deleted on file delete
This commit is contained in:
commit
3863e69733
|
@ -142,7 +142,7 @@ function! NERDTreeMoveNode()
|
|||
endif
|
||||
|
||||
try
|
||||
let bufnum = bufnr(curNode.path.str())
|
||||
let bufnum = bufnr("^".curNode.path.str()."$")
|
||||
|
||||
call curNode.rename(newNodePath)
|
||||
call NERDTreeRender()
|
||||
|
@ -190,7 +190,7 @@ function! NERDTreeDeleteNode()
|
|||
|
||||
"if the node is open in a buffer, ask the user if they want to
|
||||
"close that buffer
|
||||
let bufnum = bufnr(currentNode.path.str())
|
||||
let bufnum = bufnr("^".currentNode.path.str()."$")
|
||||
if buflisted(bufnum)
|
||||
let prompt = "\nNode deleted.\n\nThe file is open in buffer ". bufnum . (bufwinnr(bufnum) ==# -1 ? " (hidden)" : "") .". Delete this buffer? (yN)"
|
||||
call s:promptToDelBuffer(bufnum, prompt)
|
||||
|
|
Loading…
Reference in New Issue
Block a user