swapfile: Always show swap dialog (E325)

If swapfile dialog prompts for input, it must be displayed to the user.

fix #8840
fix #9027
This commit is contained in:
Justin M. Keyes
2018-09-23 10:13:56 +02:00
parent c3d24368a1
commit 22c83a4de9
4 changed files with 155 additions and 79 deletions

View File

@@ -535,6 +535,7 @@ void ml_open_file(buf_T *buf)
void check_need_swap(int newfile)
{
int old_msg_silent = msg_silent; // might be reset by an E325 message
msg_silent = 0; // If swap dialog prompts for input, user needs to see it!
if (curbuf->b_may_swap && (!curbuf->b_p_ro || !newfile)) {
ml_open_file(curbuf);