mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 22:48:34 +00:00
vim-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 vim/vim#12045)
d6a4ea3aa0
Cherry-pick Test_edit_gr_special() from patch 9.0.1347.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -4720,6 +4720,11 @@ static void 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()) {
|
||||
|
Reference in New Issue
Block a user