summaryrefslogtreecommitdiff
path: root/src/undo.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/undo.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/undo.c')
-rw-r--r--src/undo.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/undo.c b/src/undo.c
index b2d1d9f11..4fd58a332 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -3531,6 +3531,19 @@ bufIsChanged(buf_T *buf)
}
/*
+ * Return TRUE if any buffer has changes. Also buffers that are not written.
+ */
+ int
+anyBufIsChanged(void)
+{
+ buf_T *buf;
+
+ FOR_ALL_BUFFERS(buf)
+ if (bufIsChanged(buf))
+ return TRUE;
+}
+
+/*
* Like bufIsChanged() but ignoring a terminal window.
*/
int