1
0
forked from aniani/vim

patch 8.1.1049: when user tries to exit with CTRL-C message is confusing

Problem:    When user tries to exit with CTRL-C message is confusing.
Solution:   Only mention ":qa!" when there is a changed buffer. (closes #4163)
This commit is contained in:
Bram Moolenaar
2019-03-25 22:21:24 +01:00
parent b45125b374
commit a84a3dd663
5 changed files with 34 additions and 1 deletions

View File

@@ -8886,7 +8886,12 @@ nv_esc(cmdarg_T *cap)
#endif
&& !VIsual_active
&& no_reason)
msg(_("Type :qa! and press <Enter> to abandon all changes and exit Vim"));
{
if (anyBufIsChanged())
msg(_("Type :qa! and press <Enter> to abandon all changes and exit Vim"));
else
msg(_("Type :qa and press <Enter> to exit Vim"));
}
/* Don't reset "restart_edit" when 'insertmode' is set, it won't be
* set again below when halfway a mapping. */