0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 9.0.1693: Ctrl-Q not handled like Ctrl-V in replace mode

Problem: Ctrl-Q not handled like Ctrl-V in replace mode
Solution: Handle Ctrl-Q like Ctrl-V

closes: #12686
closes: #12684

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2023-08-12 00:03:57 +02:00
parent db4fd29063
commit 2d63e4b3cc
3 changed files with 43 additions and 2 deletions

View File

@@ -4767,7 +4767,7 @@ nv_replace(cmdarg_T *cap)
#endif
// get another character
if (cap->nchar == Ctrl_V)
if (cap->nchar == Ctrl_V || cap->nchar == Ctrl_Q)
{
had_ctrl_v = Ctrl_V;
cap->nchar = get_literal(FALSE);
@@ -5051,7 +5051,8 @@ nv_vreplace(cmdarg_T *cap)
emsg(_(e_cannot_make_changes_modifiable_is_off));
else
{
if (cap->extra_char == Ctrl_V) // get another character
if (cap->extra_char == Ctrl_V || cap->extra_char == Ctrl_Q)
// 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