summaryrefslogtreecommitdiff
path: root/src/normal.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-03-25 22:21:24 +0100
committerBram Moolenaar <Bram@vim.org>2019-03-25 22:21:24 +0100
commita84a3dd6635fcd2e07f510cba6a999585dcc381a (patch)
tree5ec1f6fef107b2cf8fe33a5bf5bb04fd9edc6999 /src/normal.c
parentb45125b374cc3a1cef176b704f518c72c518f24c (diff)
downloadvim-git-a84a3dd6635fcd2e07f510cba6a999585dcc381a.tar.gz
patch 8.1.1049: when user tries to exit with CTRL-C message is confusingv8.1.1049
Problem: When user tries to exit with CTRL-C message is confusing. Solution: Only mention ":qa!" when there is a changed buffer. (closes #4163)
Diffstat (limited to 'src/normal.c')
-rw-r--r--src/normal.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/normal.c b/src/normal.c
index 477907520..f99c7e3ec 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -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. */