aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean@guyomarch.bzh>2017-06-04 23:56:38 +0200
committerJean Guyomarc'h <jean@guyomarch.bzh>2017-06-04 23:56:38 +0200
commit97469490fb0a4c2d347b3178c16f2605d4b0fe2d (patch)
tree38335b5d8c50e9ffa14d3e12d965bdbd8e500efd
parenttermptyesc: fix invalid clamping on CSI X (diff)
downloadterminology-97469490fb0a4c2d347b3178c16f2605d4b0fe2d.tar.gz
termio: fix mouse button event tracking in vim
Commit 9e0b63403f423b12172a010d71d1d5f67788df29 caused mouse events not to be processed correctly by vim. Resizing subwindows with the mouse was fully broken. Without the mouse button information, the button event tracking could not be forwarded to the terminal.
-rw-r--r--src/bin/termio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/termio.c b/src/bin/termio.c
index e907498..b1ca5fd 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -3793,7 +3793,7 @@ _rep_mouse_up(Termio *sd, Evas_Event_Mouse_Up *ev, int cx, int cy)
}
static Eina_Bool
-_rep_mouse_move(Termio *sd, int cx, int cy)
+_rep_mouse_move(Termio *sd, Evas_Event_Mouse_Move *ev, int cx, int cy)
{
char buf[64];
Eina_Bool ret = EINA_FALSE;
@@ -3807,7 +3807,7 @@ _rep_mouse_move(Termio *sd, int cx, int cy)
if ((!sd->mouse.button) && (sd->pty->mouse_mode == MOUSE_NORMAL_BTN_MOVE))
return EINA_FALSE;
- btn = - 1;
+ btn = sd->mouse.button - 1;
switch (sd->pty->mouse_ext)
{
@@ -4400,7 +4400,7 @@ _smart_cb_mouse_move(void *data,
sd->mouse.cx = cx;
sd->mouse.cy = cy;
if (!shift && !ctrl)
- if (_rep_mouse_move(sd, cx, cy)) return;
+ if (_rep_mouse_move(sd, ev, cx, cy)) return;
if (sd->link.down.dnd)
{
sd->pty->selection.makesel = EINA_FALSE;