@@ -1164,6 +1164,18 @@ mch_setmouse(int on)
11641164 SetConsoleMode (g_hConIn , cmodein );
11651165}
11661166
1167+
1168+ #if defined(FEAT_BEVAL_TERM ) || defined(PROTO )
1169+ /*
1170+ * Called when 'balloonevalterm' changed.
1171+ */
1172+ void
1173+ mch_bevalterm_changed (void )
1174+ {
1175+ mch_setmouse (g_fMouseActive );
1176+ }
1177+ #endif
1178+
11671179/*
11681180 * Decode a MOUSE_EVENT. If it's a valid event, return MOUSE_LEFT,
11691181 * MOUSE_MIDDLE, or MOUSE_RIGHT for a click; MOUSE_DRAG for a mouse
@@ -1243,7 +1255,7 @@ decode_mouse_event(
12431255
12441256 if (pmer -> dwEventFlags == MOUSE_MOVED )
12451257 {
1246- /* ignore MOUSE_MOVED events if (x, y) hasn't changed. (We get these
1258+ /* Ignore MOUSE_MOVED events if (x, y) hasn't changed. (We get these
12471259 * events even when the mouse moves only within a char cell.) */
12481260 if (s_xOldMouse == g_xMouse && s_yOldMouse == g_yMouse )
12491261 return FALSE;
@@ -1252,11 +1264,20 @@ decode_mouse_event(
12521264 /* If no buttons are pressed... */
12531265 if ((pmer -> dwButtonState & ((1 << cButtons ) - 1 )) == 0 )
12541266 {
1267+ nButton = MOUSE_RELEASE ;
1268+
12551269 /* If the last thing returned was MOUSE_RELEASE, ignore this */
12561270 if (s_fReleased )
1257- return FALSE;
1271+ {
1272+ #ifdef FEAT_BEVAL_TERM
1273+ /* do return mouse move events when we want them */
1274+ if (p_bevalterm )
1275+ nButton = MOUSE_DRAG ;
1276+ else
1277+ #endif
1278+ return FALSE;
1279+ }
12581280
1259- nButton = MOUSE_RELEASE ;
12601281 s_fReleased = TRUE;
12611282 }
12621283 else /* one or more buttons pressed */
0 commit comments