You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I add set confirm in .vimrc and install minibufexpl.
And if I modify one or more file and close it by ":MBEbd" or "d" in MBE, vim doesn't display the confirmation prompt, but actually the options stil work, type "y" can save the modified and close, type "n" can not save the modified and close, type "c" can cancel it, type nothing you will jam.
Additional: can't change current buffer name's and current modified buffer name's color, I have tried
hi MBEChanged
hi MBEVisibleNormal
hi MBEVisibleNormalActive
hi MBEVisibleChanged
hi MBEVisibleChangedActive
but no one work.
The text was updated successfully, but these errors were encountered:
The problem with set confirm is happening because the bd command is running silently. See the DeleteBuffer function:
let l:cmd = 'silent! '.l:cmd.' '.l:bufNum
call <SID>DEBUG('About to execute the command "'.l:cmd.'"',5)
exec l:cmd
I restored the prompt by replacing the above code with these lines:
let l:cmd = l:cmd.' '.l:bufNum
if &confirm == 0
let l:cmd = 'silent! '.l:cmd
endif
call <SID>DEBUG('About to execute the command "'.l:cmd.'"',5)
exec l:cmd
However, if I cancel the :MBEbd function, I get these error messages:
Save changes to "Untitled"?
[Y]es, (N)o, (C)ancel: C
Error detected while processing function <SNR>21_DeleteBuffer:
line 66:
E516: No buffers were deleted: bd 1
I assume these are the sort of messages silent was intended to hide. I'm not sure how or if they can be suppressed while still showing the confirmation prompt. (I'm relatively new to vimscript.) Then again, this may be a small prices to pay for having the prompt again, especially considering that (C)ancel may be a rarely used option.
I add
set confirm
in .vimrc and install minibufexpl.And if I modify one or more file and close it by ":MBEbd" or "d" in MBE, vim doesn't display the confirmation prompt, but actually the options stil work, type "y" can save the modified and close, type "n" can not save the modified and close, type "c" can cancel it, type nothing you will jam.
Additional: can't change current buffer name's and current modified buffer name's color, I have tried
but no one work.
The text was updated successfully, but these errors were encountered: