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)
diff --git a/src/normal.c b/src/normal.c
index 4779075..f99c7e3 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -8886,7 +8886,12 @@
#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. */