Skip to content

Commit 1f8495c

Browse files
committed
patch 8.0.1659: scroll events not recognized for some xterm emulators
Problem: Scroll events not recognized for some xterm emulators. Solution: Recognize mouse codes 0x40 and 0x41 as scroll events.
1 parent 79cf7c0 commit 1f8495c

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/term.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5195,10 +5195,13 @@ check_termcode(
51955195
# ifdef FEAT_GUI
51965196
&& !gui.in_use
51975197
# endif
5198-
&& (mouse_code == 0x23 || mouse_code == 0x24))
5198+
&& (mouse_code == 0x23 || mouse_code == 0x24
5199+
|| mouse_code == 0x40 || mouse_code == 0x41))
51995200
{
5200-
/* Apparently used by rxvt scroll wheel. */
5201-
wheel_code = mouse_code - 0x23 + MOUSEWHEEL_LOW;
5201+
/* Apparently 0x23 and 0x24 are used by rxvt scroll wheel.
5202+
* And 0x40 and 0x41 are used by some xterm emulator. */
5203+
wheel_code = mouse_code - (mouse_code >= 0x40 ? 0x40 : 0x23)
5204+
+ MOUSEWHEEL_LOW;
52025205
}
52035206
# endif
52045207

src/version.c

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

763763
static int included_patches[] =
764764
{ /* Add new patch number below this line */
765+
/**/
766+
1659,
765767
/**/
766768
1658,
767769
/**/

0 commit comments

Comments
 (0)