changeset 13573:23e5f12f43d7 v8.0.1659

patch 8.0.1659: scroll events not recognized for some xterm emulators commit https://github.com/vim/vim/commit/1f8495cf48888ff3a8ab3d0eb22db92389191a60 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Apr 4 21:53:11 2018 +0200 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.
author Christian Brabandt <cb@256bit.org>
date Wed, 04 Apr 2018 22:00:06 +0200
parents 9a854ee46751
children 73c69063091f
files src/term.c src/version.c
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/term.c
+++ b/src/term.c
@@ -5195,10 +5195,13 @@ check_termcode(
 #    ifdef FEAT_GUI
 			&& !gui.in_use
 #    endif
-			&& (mouse_code == 0x23 || mouse_code == 0x24))
+			&& (mouse_code == 0x23 || mouse_code == 0x24
+			    || mouse_code == 0x40 || mouse_code == 0x41))
 		{
-		    /* Apparently used by rxvt scroll wheel. */
-		    wheel_code = mouse_code - 0x23 + MOUSEWHEEL_LOW;
+		    /* Apparently 0x23 and 0x24 are used by rxvt scroll wheel.
+		     * And 0x40 and 0x41 are used by some xterm emulator. */
+		    wheel_code = mouse_code - (mouse_code >= 0x40 ? 0x40 : 0x23)
+							      + MOUSEWHEEL_LOW;
 		}
 #   endif
 
--- a/src/version.c
+++ b/src/version.c
@@ -763,6 +763,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1659,
+/**/
     1658,
 /**/
     1657,