patch 8.1.2171: mouse support not always available
Problem: Mouse support not always available.
Solution: Enable mouse support also in tiny version. Do not define
FEAT_MOUSE_XTERM on MS-Windows (didn't really work).
diff --git a/src/getchar.c b/src/getchar.c
index 475bfca..03a67be 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -1325,10 +1325,8 @@
static int old_char = -1; /* character put back by vungetc() */
static int old_mod_mask; /* mod_mask for ungotten character */
-#ifdef FEAT_MOUSE
static int old_mouse_row; /* mouse_row related to old_char */
static int old_mouse_col; /* mouse_col related to old_char */
-#endif
/*
* Save all three kinds of typeahead, so that the user must type at a prompt.
@@ -1559,10 +1557,8 @@
c = old_char;
old_char = -1;
mod_mask = old_mod_mask;
-#ifdef FEAT_MOUSE
mouse_row = old_mouse_row;
mouse_col = old_mouse_col;
-#endif
}
else
{
@@ -2007,7 +2003,6 @@
rettv->v_type = VAR_STRING;
rettv->vval.v_string = vim_strsave(temp);
-#ifdef FEAT_MOUSE
if (is_mouse_key(n))
{
int row = mouse_row;
@@ -2025,11 +2020,11 @@
if (win == NULL)
return;
(void)mouse_comp_pos(win, &row, &col, &lnum, NULL);
-# ifdef FEAT_TEXT_PROP
+#ifdef FEAT_TEXT_PROP
if (WIN_IS_POPUP(win))
winnr = 0;
else
-# endif
+#endif
for (wp = firstwin; wp != win && wp != NULL;
wp = wp->w_next)
++winnr;
@@ -2039,7 +2034,6 @@
set_vim_var_nr(VV_MOUSE_COL, col + 1);
}
}
-#endif
}
}
@@ -2636,10 +2630,8 @@
{
old_char = c;
old_mod_mask = mod_mask;
-#ifdef FEAT_MOUSE
old_mouse_row = mouse_row;
old_mouse_col = mouse_col;
-#endif
}
/*