summaryrefslogtreecommitdiff
path: root/src/ex_getln.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r--src/ex_getln.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index ec6ee567a..e4a1c99b4 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -1942,6 +1942,23 @@ text_locked_msg()
EMSG(_(e_secure));
}
+#if defined(FEAT_AUTOCMD) || defined(PROTO)
+/*
+ * Check if "curbuf_lock" is set and return TRUE when it is and give an error
+ * message.
+ */
+ int
+curbuf_locked()
+{
+ if (curbuf_lock > 0)
+ {
+ EMSG(_("E788: Not allowed to edit another buffer now"));
+ return TRUE;
+ }
+ return FALSE;
+}
+#endif
+
static int
cmdline_charsize(idx)
int idx;