diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-10-17 23:00:07 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-10-17 23:00:07 +0200 |
commit | a1cb1d1dce14dd005797590721f1bcd0e7c3b35f (patch) | |
tree | be364e198e623b25d59e58d205e598fd954d3f17 /src/getchar.c | |
parent | 0d2c4bf1714a6b286bd7a10061044414e0b17a15 (diff) | |
download | vim-git-a1cb1d1dce14dd005797590721f1bcd0e7c3b35f.tar.gz |
patch 8.1.2171: mouse support not always availablev8.1.2171
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).
Diffstat (limited to 'src/getchar.c')
-rw-r--r-- | src/getchar.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/getchar.c b/src/getchar.c index 475bfca8e..03a67be34 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -1325,10 +1325,8 @@ save_typebuf(void) 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 @@ vgetc(void) 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 @@ f_getchar(typval_T *argvars, typval_T *rettv) 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 @@ f_getchar(typval_T *argvars, typval_T *rettv) 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 @@ f_getchar(typval_T *argvars, typval_T *rettv) set_vim_var_nr(VV_MOUSE_COL, col + 1); } } -#endif } } @@ -2636,10 +2630,8 @@ vungetc(int c) { old_char = c; old_mod_mask = mod_mask; -#ifdef FEAT_MOUSE old_mouse_row = mouse_row; old_mouse_col = mouse_col; -#endif } /* |