summaryrefslogtreecommitdiff
path: root/src/undo.c
diff options
context:
space:
mode:
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