Mercurial > vim
diff src/normal.c @ 32045:55926b4f2246 v9.0.1354
patch 9.0.1354: "gr CTRL-G" stays in virtual replace mode
Commit: https://github.com/vim/vim/commit/d6a4ea3aa0d3f4a886ea900e94bf4e8ca8ae8d63
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 25 14:24:44 2023 +0000
patch 9.0.1354: "gr CTRL-G" stays in virtual replace mode
Problem: "gr CTRL-G" stays in virtual replace mode. (Pierre Ganty)
Solution: Prepend CTRL-V before control characters. (closes https://github.com/vim/vim/issues/12045)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 25 Feb 2023 15:30:02 +0100 |
parents | 4545f58c8490 |
children | 717a1a8dc751 |
line wrap: on
line diff
--- a/src/normal.c +++ b/src/normal.c @@ -5033,6 +5033,10 @@ nv_vreplace(cmdarg_T *cap) { if (cap->extra_char == Ctrl_V) // get another character cap->extra_char = get_literal(FALSE); + if (cap->extra_char < ' ') + // Prefix a control character with CTRL-V to avoid it being used as + // a command. + stuffcharReadbuff(Ctrl_V); stuffcharReadbuff(cap->extra_char); stuffcharReadbuff(ESC); if (virtual_active())