/*
* +balloon_eval_term Allow balloon expression evaluation in the terminal.
*/
-#if defined(FEAT_HUGE) && defined(UNIX) && defined(FEAT_TIMERS)
+#if defined(FEAT_HUGE) && (defined(UNIX) || defined(WIN32)) && defined(FEAT_TIMERS)
# define FEAT_BEVAL_TERM
#endif
SetConsoleMode(g_hConIn, cmodein);
}
+
+#if defined(FEAT_BEVAL_TERM) || defined(PROTO)
+/*
+ * Called when 'balloonevalterm' changed.
+ */
+ void
+mch_bevalterm_changed(void)
+{
+ mch_setmouse(g_fMouseActive);
+}
+#endif
+
/*
* Decode a MOUSE_EVENT. If it's a valid event, return MOUSE_LEFT,
* MOUSE_MIDDLE, or MOUSE_RIGHT for a click; MOUSE_DRAG for a mouse
if (pmer->dwEventFlags == MOUSE_MOVED)
{
- /* ignore MOUSE_MOVED events if (x, y) hasn't changed. (We get these
+ /* Ignore MOUSE_MOVED events if (x, y) hasn't changed. (We get these
* events even when the mouse moves only within a char cell.) */
if (s_xOldMouse == g_xMouse && s_yOldMouse == g_yMouse)
return FALSE;
/* If no buttons are pressed... */
if ((pmer->dwButtonState & ((1 << cButtons) - 1)) == 0)
{
+ nButton = MOUSE_RELEASE;
+
/* If the last thing returned was MOUSE_RELEASE, ignore this */
if (s_fReleased)
- return FALSE;
+ {
+#ifdef FEAT_BEVAL_TERM
+ /* do return mouse move events when we want them */
+ if (p_bevalterm)
+ nButton = MOUSE_DRAG;
+ else
+#endif
+ return FALSE;
+ }
- nButton = MOUSE_RELEASE;
s_fReleased = TRUE;
}
else /* one or more buttons pressed */
void dyn_libintl_end(void);
void PlatformId(void);
void mch_setmouse(int on);
+void mch_bevalterm_changed(void);
void mch_update_cursor(void);
int mch_char_avail(void);
int mch_check_messages(void);