patch 8.2.5043: can open a cmdline window from a substitute expression
Problem: Can open a cmdline window from a substitute expression.
Solution: Disallow opening a command line window when text or buffer is
locked.
diff --git a/src/buffer.c b/src/buffer.c
index efec431..e775398 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -2407,12 +2407,7 @@
if (buf == curbuf)
return OK;
- if (text_locked())
- {
- text_locked_msg();
- return FAIL;
- }
- if (curbuf_locked())
+ if (text_or_buf_locked())
return FAIL;
// altfpos may be changed by getfile(), get it now