Skip to content

Instantly share code, notes, and snippets.

@saitoha
Last active December 11, 2015 01:59
Show Gist options
  • Select an option

  • Save saitoha/4527424 to your computer and use it in GitHub Desktop.

Select an option

Save saitoha/4527424 to your computer and use it in GitHub Desktop.
Fix motion event behavior when xterm mouse mode is in ANY_EVENT_MOUSE.
diff -u xterm-288.old/button.c xterm-288/button.c
--- xterm-288.old/button.c 2013-01-14 10:47:52.000000000 +0900
+++ xterm-288/button.c 2013-01-14 11:32:26.000000000 +0900
@@ -4333,7 +4333,7 @@
break;
}
}
- screen->mouse_button = button;
+ screen->mouse_button = 3;
count = EMIT_BUTTON(button);
break;
case MotionNotify:
@@ -4344,6 +4344,8 @@
&& (col == screen->mouse_col)) {
changed = False;
} else {
+ if (screen->mouse_button == -1)
+ screen->mouse_button = 3;
count = EMIT_BUTTON(screen->mouse_button);
}
break;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment