0
0
mirror of https://github.com/vim/vim.git synced 2025-10-27 09:24:23 -04:00

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.
This commit is contained in:
Bram Moolenaar
2017-11-18 18:52:04 +01:00
parent 234d16286a
commit 51b0f3701e
26 changed files with 419 additions and 85 deletions

View File

@@ -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 @@ term_send_mouse(VTerm *vterm, int button, int pressed)
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 @@ term_convert_key(term_T *term, int c, char *buf)
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 @@ send_keys_to_term(term_T *term, int c, int typed)
case K_LEFTMOUSE_NM:
case K_LEFTRELEASE:
case K_LEFTRELEASE_NM:
case K_MOUSEMOVE:
case K_MIDDLEMOUSE:
case K_MIDDLERELEASE:
case K_RIGHTMOUSE: