comparison src/optionstr.c @ 18354:9f51d0cef8da v8.1.2171

patch 8.1.2171: mouse support not always available Commit: https://github.com/vim/vim/commit/a1cb1d1dce14dd005797590721f1bcd0e7c3b35f Author: Bram Moolenaar <Bram@vim.org> Date: Thu Oct 17 23:00:07 2019 +0200 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).
author Bram Moolenaar <Bram@vim.org>
date Thu, 17 Oct 2019 23:15:04 +0200
parents 86887d3fd6f7
children ba5d8c5d77d7
comparison
equal deleted inserted replaced
18353:c3a0f5d3c9d4 18354:9f51d0cef8da
45 static char *(p_toolbar_values[]) = {"text", "icons", "tooltips", "horiz", NULL}; 45 static char *(p_toolbar_values[]) = {"text", "icons", "tooltips", "horiz", NULL};
46 #endif 46 #endif
47 #if defined(FEAT_TOOLBAR) && defined(FEAT_GUI_GTK) 47 #if defined(FEAT_TOOLBAR) && defined(FEAT_GUI_GTK)
48 static char *(p_tbis_values[]) = {"tiny", "small", "medium", "large", "huge", "giant", NULL}; 48 static char *(p_tbis_values[]) = {"tiny", "small", "medium", "large", "huge", "giant", NULL};
49 #endif 49 #endif
50 #if defined(FEAT_MOUSE) && (defined(UNIX) || defined(VMS)) 50 #if defined(UNIX) || defined(VMS)
51 static char *(p_ttym_values[]) = {"xterm", "xterm2", "dec", "netterm", "jsbterm", "pterm", "urxvt", "sgr", NULL}; 51 static char *(p_ttym_values[]) = {"xterm", "xterm2", "dec", "netterm", "jsbterm", "pterm", "urxvt", "sgr", NULL};
52 #endif 52 #endif
53 static char *(p_ve_values[]) = {"block", "insert", "all", "onemore", NULL}; 53 static char *(p_ve_values[]) = {"block", "insert", "all", "onemore", NULL};
54 static char *(p_wop_values[]) = {"tagfile", NULL}; 54 static char *(p_wop_values[]) = {"tagfile", NULL};
55 #ifdef FEAT_WAK 55 #ifdef FEAT_WAK
108 (void)opt_strings_flags(p_fdo, p_fdo_values, &fdo_flags, TRUE); 108 (void)opt_strings_flags(p_fdo, p_fdo_values, &fdo_flags, TRUE);
109 #endif 109 #endif
110 (void)opt_strings_flags(p_dy, p_dy_values, &dy_flags, TRUE); 110 (void)opt_strings_flags(p_dy, p_dy_values, &dy_flags, TRUE);
111 (void)opt_strings_flags(p_tc, p_tc_values, &tc_flags, FALSE); 111 (void)opt_strings_flags(p_tc, p_tc_values, &tc_flags, FALSE);
112 (void)opt_strings_flags(p_ve, p_ve_values, &ve_flags, TRUE); 112 (void)opt_strings_flags(p_ve, p_ve_values, &ve_flags, TRUE);
113 #if defined(FEAT_MOUSE) && (defined(UNIX) || defined(VMS)) 113 #if defined(UNIX) || defined(VMS)
114 (void)opt_strings_flags(p_ttym, p_ttym_values, &ttym_flags, FALSE); 114 (void)opt_strings_flags(p_ttym, p_ttym_values, &ttym_flags, FALSE);
115 #endif 115 #endif
116 #if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_MSWIN) 116 #if defined(FEAT_TOOLBAR) && !defined(FEAT_GUI_MSWIN)
117 (void)opt_strings_flags(p_toolbar, p_toolbar_values, &toolbar_flags, TRUE); 117 (void)opt_strings_flags(p_toolbar, p_toolbar_values, &toolbar_flags, TRUE);
118 #endif 118 #endif
1586 { 1586 {
1587 redraw_gui_only = TRUE; 1587 redraw_gui_only = TRUE;
1588 } 1588 }
1589 #endif 1589 #endif
1590 1590
1591 #if defined(FEAT_MOUSE_TTY) && (defined(UNIX) || defined(VMS)) 1591 #if defined(UNIX) || defined(VMS)
1592 // 'ttymouse' 1592 // 'ttymouse'
1593 else if (varp == &p_ttym) 1593 else if (varp == &p_ttym)
1594 { 1594 {
1595 // Switch the mouse off before changing the escape sequences used for 1595 // Switch the mouse off before changing the escape sequences used for
1596 // that. 1596 // that.
2252 else if (varp == &curwin->w_p_cocu) // 'concealcursor' 2252 else if (varp == &curwin->w_p_cocu) // 'concealcursor'
2253 p = (char_u *)COCU_ALL; 2253 p = (char_u *)COCU_ALL;
2254 #endif 2254 #endif
2255 else if (varp == &p_mouse) // 'mouse' 2255 else if (varp == &p_mouse) // 'mouse'
2256 { 2256 {
2257 #ifdef FEAT_MOUSE
2258 p = (char_u *)MOUSE_ALL; 2257 p = (char_u *)MOUSE_ALL;
2259 #else
2260 if (*p_mouse != NUL)
2261 errmsg = N_("E538: No mouse support");
2262 #endif
2263 } 2258 }
2264 #if defined(FEAT_GUI) 2259 #if defined(FEAT_GUI)
2265 else if (varp == &p_go) // 'guioptions' 2260 else if (varp == &p_go) // 'guioptions'
2266 p = (char_u *)GO_ALL; 2261 p = (char_u *)GO_ALL;
2267 #endif 2262 #endif
2387 } 2382 }
2388 } 2383 }
2389 #endif 2384 #endif
2390 } 2385 }
2391 2386
2392 #ifdef FEAT_MOUSE
2393 if (varp == &p_mouse) 2387 if (varp == &p_mouse)
2394 { 2388 {
2395 # ifdef FEAT_MOUSE_TTY
2396 if (*p_mouse == NUL) 2389 if (*p_mouse == NUL)
2397 mch_setmouse(FALSE); // switch mouse off 2390 mch_setmouse(FALSE); // switch mouse off
2398 else 2391 else
2399 # endif
2400 setmouse(); // in case 'mouse' changed 2392 setmouse(); // in case 'mouse' changed
2401 } 2393 }
2402 #endif
2403 2394
2404 if (curwin->w_curswant != MAXCOL 2395 if (curwin->w_curswant != MAXCOL
2405 && (get_option_flags(opt_idx) & (P_CURSWANT | P_RALL)) != 0) 2396 && (get_option_flags(opt_idx) & (P_CURSWANT | P_RALL)) != 0)
2406 curwin->w_set_curswant = TRUE; 2397 curwin->w_set_curswant = TRUE;
2407 2398
2408 #ifdef FEAT_GUI 2399 #ifdef FEAT_GUI
2409 // check redraw when it's not a GUI option or the GUI is active. 2400 // check redraw when it's not a GUI option or the GUI is active.
2410 if (!redraw_gui_only || gui.in_use) 2401 if (!redraw_gui_only || gui.in_use)