Getting rid of error and 'press ENTER to continue'?
Closed this issue · 1 comments
louwers commented
Just a suggestion: :bd
shows a warning message when trying to delete a buffer that has been modified. :BD
, on the other hand, shows an error ("Error detected while processing function 18_BufKill:") and that same warning message. It also shows 'Press ENTER to continue'.
I looked into it a little, and I think we can replicate :bd
's behavior with:
echohl ErrorMsg
echo "No write since last change for buffer '" . bufname(s:BufKillBufferToKill) . "' (add ! to override)"
echohl None
qpkorr commented
Hi! Better late than never - thanks, good idea. I usually have 'confirm' enabled so I never see this message, but your suggestion does make sense, and I'll upload a new version including it soon (testing at present).
Cheers, John