aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index f63987136f..2dfe2950fc 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -2412,13 +2412,11 @@ char_u * get_text_locked_msg(void) {
}
}
-/*
- * Check if "curbuf_lock" or "allbuf_lock" is set and return TRUE when it is
- * and give an error message.
- */
+/// Check if "curbuf_lock" or "allbuf_lock" is set and return TRUE when it is
+/// and give an error message.
int curbuf_locked(void)
{
- if (curbuf_lock > 0) {
+ if (curbuf->b_ro_locked > 0) {
EMSG(_("E788: Not allowed to edit another buffer now"));
return TRUE;
}
@@ -6513,7 +6511,7 @@ static int open_cmdwin(void)
curwin->w_p_fen = false;
// Don't allow switching to another buffer.
- curbuf_lock++;
+ curbuf->b_ro_locked++;
// Showing the prompt may have set need_wait_return, reset it.
need_wait_return = false;
@@ -6526,7 +6524,7 @@ static int open_cmdwin(void)
}
set_option_value("ft", 0L, "vim", OPT_LOCAL);
}
- curbuf_lock--;
+ curbuf->b_ro_locked--;
// Reset 'textwidth' after setting 'filetype' (the Vim filetype plugin
// sets 'textwidth' to 78).