vim-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.
51b0f3701e
This commit is contained in:
Jan Edmund Lazo
2021-05-05 23:09:02 -04:00
parent 4910ac9ab8
commit 51403d6d41
8 changed files with 20 additions and 6 deletions

View File

@@ -450,6 +450,7 @@ static int terminal_execute(VimState *state, int key)
case K_LEFTMOUSE:
case K_LEFTDRAG:
case K_LEFTRELEASE:
case K_MOUSEMOVE:
case K_MIDDLEMOUSE:
case K_MIDDLEDRAG:
case K_MIDDLERELEASE:
@@ -1098,6 +1099,7 @@ static bool send_mouse_event(Terminal *term, int c)
switch (c) {
case K_LEFTDRAG: drag = true; FALLTHROUGH;
case K_LEFTMOUSE: button = 1; break;
case K_MOUSEMOVE: drag = true; button = 0; break;
case K_MIDDLEDRAG: drag = true; FALLTHROUGH;
case K_MIDDLEMOUSE: button = 2; break;
case K_RIGHTDRAG: drag = true; FALLTHROUGH;