patch 8.0.1309: cannot use 'balloonexpr' in a terminal
Problem: Cannot use 'balloonexpr' in a terminal.
Solution: Add 'balloonevalterm' and add code to handle mouse movements in a
terminal. Initial implementation for Unix with GUI.
diff --git a/src/terminal.c b/src/terminal.c
index b416e20..6cbe343 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -52,6 +52,7 @@
* - Termdebug does not work when Vim build with mzscheme. gdb hangs.
* - MS-Windows GUI: WinBar has tearoff item
* - MS-Windows GUI: still need to type a key after shell exits? #1924
+ * - After executing a shell command the status line isn't redraw.
* - What to store in a session file? Shell at the prompt would be OK to
* restore, but others may not. Open the window and let the user start the
* command?
@@ -717,7 +718,8 @@
vterm_mouse_move(vterm, mouse_row - W_WINROW(curwin),
mouse_col - curwin->w_wincol, mod);
- vterm_mouse_button(vterm, button, pressed, mod);
+ if (button != 0)
+ vterm_mouse_button(vterm, button, pressed, mod);
return TRUE;
}
@@ -818,6 +820,7 @@
case K_LEFTDRAG: other = term_send_mouse(vterm, 1, 1); break;
case K_LEFTRELEASE:
case K_LEFTRELEASE_NM: other = term_send_mouse(vterm, 1, 0); break;
+ case K_MOUSEMOVE: other = term_send_mouse(vterm, 0, 0); break;
case K_MIDDLEMOUSE: other = term_send_mouse(vterm, 2, 1); break;
case K_MIDDLEDRAG: other = term_send_mouse(vterm, 2, 1); break;
case K_MIDDLERELEASE: other = term_send_mouse(vterm, 2, 0); break;
@@ -1284,6 +1287,7 @@
case K_LEFTMOUSE_NM:
case K_LEFTRELEASE:
case K_LEFTRELEASE_NM:
+ case K_MOUSEMOVE:
case K_MIDDLEMOUSE:
case K_MIDDLERELEASE:
case K_RIGHTMOUSE: