dont_sync_undo = MAYBE;
break;
+ case ESC:
+ // Esc after CTRL-G cancels it.
+ break;
+
// Unknown CTRL-G command, reserved for future expansion.
default: vim_beep(BO_CTRLG);
}
{
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())
func Test_edit_gr_special()
enew
call setline(1, ['abcdef', 'xxxxxx'])
- exe "normal! gr\<C-O>x"
- call assert_equal('bcdef', getline(1))
+ exe "normal! gr\<C-O>lx"
+ call assert_equal("\<C-O>def", getline(1))
+
+ call setline(1, 'abcdef')
+ exe "normal! 0gr\<C-G>lx"
+ call assert_equal("\<C-G>def", getline(1))
bwipe!
endfunc
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1354,
/**/
1353,
/**/