vim-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.
71223e2db8
This commit is contained in:
zeertzjq
2022-07-07 05:37:30 +08:00
parent df4c634d06
commit 0612101c92
4 changed files with 45 additions and 10 deletions

View File

@@ -1963,11 +1963,7 @@ int buflist_getfile(int n, linenr_T lnum, int options, int forceit)
return OK;
}
if (text_locked()) {
text_locked_msg();
return FAIL;
}
if (curbuf_locked()) {
if (text_or_buf_locked()) {
return FAIL;
}