Don't require user to type 'yes' to delete an empty directory

This commit is contained in:
Mike Perri 2016-01-07 09:53:28 -06:00
parent 2e2b649232
commit d2509d279e

View File

@ -160,7 +160,7 @@ function! NERDTreeDeleteNode()
let currentNode = g:NERDTreeFileNode.GetSelected() let currentNode = g:NERDTreeFileNode.GetSelected()
let confirmed = 0 let confirmed = 0
if currentNode.path.isDirectory if currentNode.path.isDirectory && currentNode.getChildCount() > 0
let choice =input("Delete the current node\n" . let choice =input("Delete the current node\n" .
\ "==========================================================\n" . \ "==========================================================\n" .
\ "STOP! To delete this entire directory, type 'yes'\n" . \ "STOP! To delete this entire directory, type 'yes'\n" .