mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-30 05:23:36 +08:00
Fix for copying error
When copying a node to a directory that's outside the current path, the "parent" node doesn't really exist, so the code raised an error.
This commit is contained in:
parent
2fbd578a77
commit
5bd641834d
|
@ -866,8 +866,10 @@ function! s:TreeFileNode.copy(dest)
|
|||
let parent = b:NERDTreeRoot.findNode(newPath.getParent())
|
||||
if !empty(parent)
|
||||
call parent.refresh()
|
||||
return parent.findNode(newPath)
|
||||
else
|
||||
return {}
|
||||
endif
|
||||
return parent.findNode(newPath)
|
||||
endfunction
|
||||
|
||||
"FUNCTION: TreeFileNode.delete {{{3
|
||||
|
|
Loading…
Reference in New Issue
Block a user