From da541c0af1ef6589548140ebce133ad3fecf6d42 Mon Sep 17 00:00:00 2001 From: altermo <107814000+altermo@users.noreply.github.com> Date: Wed, 17 Jan 2024 00:35:32 +0100 Subject: vim-patch:9.1.0035: i_CTRL-] triggers InsertCharPre (#27049) * vim-patch:9.1.0035: i_CTRL-] triggers InsertCharPre Problem: i_CTRL-] triggers InsertCharPre Solution: Return if CTRL-] is received. InsertCharPre is supposed to be only used for chars to be inserted but i_CTRL-] triggers expansion and is not inserted into the buffer (altermo) closes: vim/vim#13853 closes: vim/vim#13864 https://github.com/vim/vim/commit/7d711fe2092d0438d2df5054df735ec34926e2bc --- src/nvim/edit.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 470d57890a..6f05ba5905 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -4725,6 +4725,10 @@ static char *do_insert_char_pre(int c) char buf[MB_MAXBYTES + 1]; const int save_State = State; + if (c == Ctrl_RSB) { + return NULL; + } + // Return quickly when there is nothing to do. if (!has_event(EVENT_INSERTCHARPRE)) { return NULL; -- cgit