mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 11:23:48 -05:00
fix for copying files
when copying a file outside the current tree root, {} is returned by
TreeFileNode.copy() so try to reposition the cursor
This commit is contained in:
@@ -179,8 +179,10 @@ function! NERDTreeCopyNode()
|
||||
if confirmed
|
||||
try
|
||||
let newNode = currentNode.copy(newNodePath)
|
||||
if !empty(newNode)
|
||||
call NERDTreeRender()
|
||||
call newNode.putCursorHere(0, 0)
|
||||
endif
|
||||
catch /^NERDTree/
|
||||
call s:echoWarning("Could not copy node")
|
||||
endtry
|
||||
|
||||
Reference in New Issue
Block a user