Confirm the wipeout of a unsaved buffer whose file has been renamed. (#949)

This commit is contained in:
Phil Runninger 2019-02-14 17:44:31 -05:00 committed by GitHub
parent 74be22deb7
commit 5e8aa9e721
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -108,7 +108,11 @@ function! s:renameBuffer(bufNum, newNodeName, isDirectory)
exec "tabnext " . s:originalTabNumber
exec s:originalWindowNumber . "wincmd w"
" 3. We don't need a previous buffer anymore
exec "bwipeout! " . a:bufNum
try
exec "confirm bwipeout " . a:bufNum
catch
" This happens when answering Cancel if confirmation is needed. Do nothing.
endtry
endfunction
"FUNCTION: NERDTreeAddNode(){{{1
function! NERDTreeAddNode()