mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-22 11:32:25 +08:00
Don't require user to type 'yes' to delete an empty directory
This commit is contained in:
parent
2e2b649232
commit
d2509d279e
|
@ -160,7 +160,7 @@ function! NERDTreeDeleteNode()
|
|||
let currentNode = g:NERDTreeFileNode.GetSelected()
|
||||
let confirmed = 0
|
||||
|
||||
if currentNode.path.isDirectory
|
||||
if currentNode.path.isDirectory && currentNode.getChildCount() > 0
|
||||
let choice =input("Delete the current node\n" .
|
||||
\ "==========================================================\n" .
|
||||
\ "STOP! To delete this entire directory, type 'yes'\n" .
|
||||
|
|
Loading…
Reference in New Issue
Block a user