diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-11-18 18:52:04 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-11-18 18:52:04 +0100 |
commit | 51b0f3701ecb440aa72ab6017c1df6940c0e0f6f (patch) | |
tree | 9cfd3546d8e52be2b1425dcc65095f8e650eadde /src/normal.c | |
parent | 234d16286a2733adedef56784c17415ae169b9ad (diff) |
patch 8.0.1309: cannot use 'balloonexpr' in a terminalv8.0.1309
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.
Diffstat (limited to 'src/normal.c')
-rw-r--r-- | src/normal.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/normal.c b/src/normal.c index e781cd70e2..81bedfdba1 100644 --- a/src/normal.c +++ b/src/normal.c @@ -358,6 +358,7 @@ static const struct nv_cmd {K_LEFTDRAG, nv_mouse, 0, 0}, {K_LEFTRELEASE, nv_mouse, 0, 0}, {K_LEFTRELEASE_NM, nv_mouse, 0, 0}, + {K_MOUSEMOVE, nv_mouse, 0, 0}, {K_MIDDLEMOUSE, nv_mouse, 0, 0}, {K_MIDDLEDRAG, nv_mouse, 0, 0}, {K_MIDDLERELEASE, nv_mouse, 0, 0}, @@ -2396,6 +2397,20 @@ do_mouse( break; } + if (c == K_MOUSEMOVE) + { + /* Mouse moved without a button pressed. */ +#ifdef FEAT_BEVALTERM + ui_may_remove_balloon(); + if (p_bevalterm && !VIsual_active) + { + profile_setlimit(p_bdlay, &bevalexpr_due); + bevalexpr_due_set = TRUE; + } +#endif + return FALSE; + } + #ifdef FEAT_MOUSESHAPE /* May have stopped dragging the status or separator line. The pointer is * most likely still on the status or separator line. */ @@ -3843,7 +3858,7 @@ add_to_showcmd(int c) K_LEFTMOUSE_NM, K_LEFTRELEASE_NM, # endif K_IGNORE, K_PS, - K_LEFTMOUSE, K_LEFTDRAG, K_LEFTRELEASE, + K_LEFTMOUSE, K_LEFTDRAG, K_LEFTRELEASE, K_MOUSEMOVE, K_MIDDLEMOUSE, K_MIDDLEDRAG, K_MIDDLERELEASE, K_RIGHTMOUSE, K_RIGHTDRAG, K_RIGHTRELEASE, K_MOUSEDOWN, K_MOUSEUP, K_MOUSELEFT, K_MOUSERIGHT, @@ -8358,6 +8373,7 @@ nv_g_cmd(cmdarg_T *cap) case K_LEFTMOUSE: case K_LEFTDRAG: case K_LEFTRELEASE: + case K_MOUSEMOVE: case K_RIGHTMOUSE: case K_RIGHTDRAG: case K_RIGHTRELEASE: |