mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 11:23:48 -05:00
Don't require user to type 'yes' to delete an empty directory
This commit is contained in:
@@ -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" .
|
||||
|
||||
Reference in New Issue
Block a user