mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-22 10:55:15 +08:00
Merge pull request #1079 from preservim/1078
Prevent overwriting existing files/dirs on node move. (m-m)
This commit is contained in:
commit
901aba632b
|
@ -8,6 +8,7 @@
|
|||
- **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR)
|
||||
-->
|
||||
#### 6.4
|
||||
- **.4**: Prevent overwriting existing files/dirs on node move. (PhilRunninger) [#1079](https://github.com/preservim/nerdtree/pull/1079)
|
||||
- **.3**: Fix regex that finds keyword for minimal menu. (PhilRunninger) [#1075](https://github.com/preservim/nerdtree/pull/1075)
|
||||
- **.2**: Lint vimscript, fix errors and warnings, add CI job to review PRs (Caleb Maclennan) [#1071](https://github.com/preservim/nerdtree/pull/1071)
|
||||
- **.1**: Ensure backward compatibility. v:t_func is not available before Vim 8.0 (Phil Runninger)
|
||||
|
|
|
@ -196,6 +196,11 @@ function! NERDTreeMoveNode()
|
|||
let curNode = g:NERDTreeFileNode.GetSelected()
|
||||
let prompt = s:inputPrompt('move')
|
||||
let newNodePath = input(prompt, curNode.path.str(), 'file')
|
||||
while filereadable(newNodePath)
|
||||
call nerdtree#echoWarning('This destination already exists. Try again.')
|
||||
let newNodePath = input(prompt, curNode.path.str(), 'file')
|
||||
endwhile
|
||||
|
||||
|
||||
if newNodePath ==# ''
|
||||
call nerdtree#echo('Node Renaming Aborted.')
|
||||
|
|
Loading…
Reference in New Issue
Block a user