Skip to content

Commit ca774f6

Browse files
committed
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)
1 parent 0b8cf27 commit ca774f6

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

src/normal.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,9 +895,23 @@ normal_cmd(
895895
if (lang && curbuf->b_p_iminsert == B_IMODE_IM)
896896
im_set_active(TRUE);
897897
#endif
898+
if ((State & INSERT) && !p_ek)
899+
{
900+
// Disable bracketed paste and modifyOtherKeys here, we won't
901+
// recognize the escape sequences with 'esckeys' off.
902+
out_str(T_BD);
903+
out_str(T_CTE);
904+
}
898905

899906
*cp = plain_vgetc();
900907

908+
if ((State & INSERT) && !p_ek)
909+
{
910+
// Re-enable bracketed paste mode and modifyOtherKeys
911+
out_str(T_BE);
912+
out_str(T_CTI);
913+
}
914+
901915
if (langmap_active)
902916
{
903917
// Undo the decrement done above

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,8 @@ static char *(features[]) =
754754

755755
static int included_patches[] =
756756
{ /* Add new patch number below this line */
757+
/**/
758+
1549,
757759
/**/
758760
1548,
759761
/**/

0 commit comments

Comments
 (0)