From f7c1e460f8ae9e316a679a29945ce6a585336322 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 7 May 2023 08:31:06 +0800 Subject: vim-patch:8.2.2062: does not handle CTRL-V Problem: does not handle CTRL-V. Solution: Call get_literal() after encountering CTRL-V. (closes vim/vim#7387) https://github.com/vim/vim/commit/4a44120e3dc1d40dd7109658afd5e078360b1d8f Co-authored-by: Bram Moolenaar --- src/nvim/getchar.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/nvim/getchar.c') diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 31817676e1..32fa517324 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -2927,6 +2927,11 @@ char *getcmdkeycmd(int promptc, void *cookie, int indent, bool do_concat) } c1 = TO_SPECIAL(c1, c2); } + if (c1 == Ctrl_V) { + // CTRL-V is followed by octal, hex or other characters, reverses + // what AppendToRedobuffLit() does. + c1 = get_literal(true); + } if (got_int) { aborted = true; -- cgit