From 0612101c92f7043e47a1b4e80120582ff538c4f8 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 7 Jul 2022 05:37:30 +0800 Subject: 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. https://github.com/vim/vim/commit/71223e2db87c2bf3b09aecb46266b56cda26191d --- src/nvim/buffer.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/nvim/buffer.c') diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 411705cfa3..7e1eae9632 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -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; } -- cgit