summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-11-20 21:52:24 +0100
committerBram Moolenaar <Bram@vim.org>2017-11-20 21:52:24 +0100
commitbb160a188abb3c40258d3e5726524ce203333e84 (patch)
tree7b9e6d532112128f93acc724740f1e13a2480c6b /src
parent73675fbc4810470f8935f05a3c16c14e0d5e737f (diff)
patch 8.0.1324: some xterm sends different mouse move codesv8.0.1324
Problem: Some xterm sends different mouse move codes. Solution: Also accept 0x80 as a move event.
Diffstat (limited to 'src')
-rw-r--r--src/term.c14
-rw-r--r--src/version.c2
2 files changed, 13 insertions, 3 deletions
diff --git a/src/term.c b/src/term.c
index 359c17100d..4e38bae5f9 100644
--- a/src/term.c
+++ b/src/term.c
@@ -4980,6 +4980,8 @@ check_termcode(
* add 0x08 for ALT
* add 0x10 for CTRL
* add 0x20 for mouse drag (0x40 is drag with left button)
+ * add 0x40 for mouse move (0x80 is move, 0x81 too)
+ * 0x43 (drag + release) is also move
* c == column + ' ' + 1 == column + 33
* r == row + ' ' + 1 == row + 33
*
@@ -5121,9 +5123,15 @@ check_termcode(
# endif
)
{
- /* Keep the mouse_code before it's changed, so that we
- * remember that it was a mouse wheel click. */
- wheel_code = mouse_code;
+# if defined(UNIX) && defined(FEAT_MOUSE_TTY)
+ if (use_xterm_mouse() > 1 && mouse_code >= 0x80)
+ /* mouse-move event, using MOUSE_DRAG works */
+ mouse_code = MOUSE_DRAG;
+ else
+# endif
+ /* Keep the mouse_code before it's changed, so that we
+ * remember that it was a mouse wheel click. */
+ wheel_code = mouse_code;
}
# ifdef FEAT_MOUSE_XTERM
else if (held_button == MOUSE_RELEASE
diff --git a/src/version.c b/src/version.c
index bbb5765949..4f9fc87b17 100644
--- a/src/version.c
+++ b/src/version.c
@@ -772,6 +772,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1324,
+/**/
1323,
/**/
1322,