1
0
forked from aniani/vim

patch 8.2.1549: "r" fails if 'esckeys' is off and modifyOtherKeys is used

Problem:    The "r" command fails for keys with modifiers if 'esckeys' is off
            and modifyOtherKeys is used. (Lauri Tirkkonen)
Solution:   Temporarily disable bracketed paste and modifyOtherKeys if
            'esckeys' is off. (closes #6809)
This commit is contained in:
Bram Moolenaar
2020-08-30 20:46:38 +02:00
parent 0b8cf278ec
commit ca774f6753
2 changed files with 16 additions and 0 deletions

View File

@@ -895,9 +895,23 @@ getcount:
if (lang && curbuf->b_p_iminsert == B_IMODE_IM) if (lang && curbuf->b_p_iminsert == B_IMODE_IM)
im_set_active(TRUE); im_set_active(TRUE);
#endif #endif
if ((State & INSERT) && !p_ek)
{
// Disable bracketed paste and modifyOtherKeys here, we won't
// recognize the escape sequences with 'esckeys' off.
out_str(T_BD);
out_str(T_CTE);
}
*cp = plain_vgetc(); *cp = plain_vgetc();
if ((State & INSERT) && !p_ek)
{
// Re-enable bracketed paste mode and modifyOtherKeys
out_str(T_BE);
out_str(T_CTI);
}
if (langmap_active) if (langmap_active)
{ {
// Undo the decrement done above // Undo the decrement done above

View File

@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1549,
/**/ /**/
1548, 1548,
/**/ /**/