aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-06-26 07:14:43 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-06-26 07:19:36 +0800
commitdc3ee122dc132b5baf11ea0083604927eb6c7443 (patch)
tree3d9ef689cac7197f5d60823dab12afea7c29a801 /src
parent7966020f70255e04bc7a8015a170307c4d5341a8 (diff)
downloadrneovim-dc3ee122dc132b5baf11ea0083604927eb6c7443.tar.gz
rneovim-dc3ee122dc132b5baf11ea0083604927eb6c7443.tar.bz2
rneovim-dc3ee122dc132b5baf11ea0083604927eb6c7443.zip
vim-patch:9.0.1665: empty CmdlineEnter autocommand causes errors in Ex mode
Problem: Empty CmdlineEnter autocommand causes errors in Ex mode. Solution: Save and restore ex_pressedreturn. (Christian Brabandt, closes # 12581, closes vim/vim#12578) https://github.com/vim/vim/commit/590aae35575cbd74d80c41d87fc647f2812aad70 Co-authored-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src')
-rw-r--r--src/nvim/autocmd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/autocmd.c b/src/nvim/autocmd.c
index f3eb5d410d..36f0183fd8 100644
--- a/src/nvim/autocmd.c
+++ b/src/nvim/autocmd.c
@@ -1784,11 +1784,13 @@ bool apply_autocmds_group(event_T event, char *fname, char *fname_io, bool force
}
const int save_did_emsg = did_emsg;
+ const bool save_ex_pressedreturn = get_pressedreturn();
// Execute the autocmd. The `getnextac` callback handles iteration.
do_cmdline(NULL, getnextac, &patcmd, DOCMD_NOWAIT | DOCMD_VERBOSE | DOCMD_REPEAT);
did_emsg += save_did_emsg;
+ set_pressedreturn(save_ex_pressedreturn);
if (nesting == 1) {
// restore cursor and topline, unless they were changed