From 71223e2db87c2bf3b09aecb46266b56cda26191d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 30 May 2022 15:23:09 +0100 Subject: 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. --- src/buffer.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index efec431c82..e775398d02 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2407,12 +2407,7 @@ buflist_getfile( 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 -- cgit v1.2.3