From 66747f18ded775e2c0b6bac73cee18a3752086af Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 25 Apr 2022 21:40:46 +0800 Subject: vim-patch:8.2.0839: dropping modifier when putting a character back in typeahead Problem: Dropping modifier when putting a character back in typeahead. Solution: Add modifier to ins_char_typebuf(). (closes vim/vim#6158) https://github.com/vim/vim/commit/b42c0d54279b1fdb79652db0c84171e213458809 Vim's test doesn't seem to work properly as the hit-enter prompt seems to be delayed. Add a Lua screen test. --- src/nvim/message.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/message.c') diff --git a/src/nvim/message.c b/src/nvim/message.c index 6708001495..90af920396 100644 --- a/src/nvim/message.c +++ b/src/nvim/message.c @@ -1214,7 +1214,7 @@ void wait_return(int redraw) } else if (vim_strchr((char_u *)"\r\n ", c) == NULL && c != Ctrl_C) { // Put the character back in the typeahead buffer. Don't use the // stuff buffer, because lmaps wouldn't work. - ins_char_typebuf(c, mod_mask); + ins_char_typebuf(vgetc_char, vgetc_mod_mask); do_redraw = true; // need a redraw even though there is // typeahead } -- cgit