comparison src/ex_getln.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 c8a53c0daeed
children 34d5cd432cac
comparison
equal deleted inserted replaced
18353:c3a0f5d3c9d4 18354:9f51d0cef8da
793 int wim_index = 0; /* index in wim_flags[] */ 793 int wim_index = 0; /* index in wim_flags[] */
794 int res; 794 int res;
795 int save_msg_scroll = msg_scroll; 795 int save_msg_scroll = msg_scroll;
796 int save_State = State; /* remember State when called */ 796 int save_State = State; /* remember State when called */
797 int some_key_typed = FALSE; /* one of the keys was typed */ 797 int some_key_typed = FALSE; /* one of the keys was typed */
798 #ifdef FEAT_MOUSE
799 /* mouse drag and release events are ignored, unless they are 798 /* mouse drag and release events are ignored, unless they are
800 * preceded with a mouse down event */ 799 * preceded with a mouse down event */
801 int ignore_drag_release = TRUE; 800 int ignore_drag_release = TRUE;
802 #endif
803 #ifdef FEAT_EVAL 801 #ifdef FEAT_EVAL
804 int break_ctrl_c = FALSE; 802 int break_ctrl_c = FALSE;
805 #endif 803 #endif
806 expand_T xpc; 804 expand_T xpc;
807 long *b_im_ptr = NULL; 805 long *b_im_ptr = NULL;
1854 goto cmdline_not_changed; 1852 goto cmdline_not_changed;
1855 } 1853 }
1856 break; 1854 break;
1857 #endif 1855 #endif
1858 1856
1859 #ifdef FEAT_MOUSE
1860 case K_MIDDLEDRAG: 1857 case K_MIDDLEDRAG:
1861 case K_MIDDLERELEASE: 1858 case K_MIDDLERELEASE:
1862 goto cmdline_not_changed; /* Ignore mouse */ 1859 goto cmdline_not_changed; /* Ignore mouse */
1863 1860
1864 case K_MIDDLEMOUSE: 1861 case K_MIDDLEMOUSE:
1958 case K_X2MOUSE: 1955 case K_X2MOUSE:
1959 case K_X2DRAG: 1956 case K_X2DRAG:
1960 case K_X2RELEASE: 1957 case K_X2RELEASE:
1961 case K_MOUSEMOVE: 1958 case K_MOUSEMOVE:
1962 goto cmdline_not_changed; 1959 goto cmdline_not_changed;
1963
1964 #endif /* FEAT_MOUSE */
1965 1960
1966 #ifdef FEAT_GUI 1961 #ifdef FEAT_GUI
1967 case K_LEFTMOUSE_NM: /* mousefocus click, ignored */ 1962 case K_LEFTMOUSE_NM: /* mousefocus click, ignored */
1968 case K_LEFTRELEASE_NM: 1963 case K_LEFTRELEASE_NM:
1969 goto cmdline_not_changed; 1964 goto cmdline_not_changed;
2193 break; 2188 break;
2194 #endif 2189 #endif
2195 2190
2196 case Ctrl_V: 2191 case Ctrl_V:
2197 case Ctrl_Q: 2192 case Ctrl_Q:
2198 #ifdef FEAT_MOUSE
2199 ignore_drag_release = TRUE; 2193 ignore_drag_release = TRUE;
2200 #endif
2201 putcmdline('^', TRUE); 2194 putcmdline('^', TRUE);
2202 c = get_literal(); /* get next (two) character(s) */ 2195 c = get_literal(); /* get next (two) character(s) */
2203 do_abbr = FALSE; /* don't do abbreviation now */ 2196 do_abbr = FALSE; /* don't do abbreviation now */
2204 extra_char = NUL; 2197 extra_char = NUL;
2205 /* may need to remove ^ when composing char was typed */ 2198 /* may need to remove ^ when composing char was typed */
2211 } 2204 }
2212 break; 2205 break;
2213 2206
2214 #ifdef FEAT_DIGRAPHS 2207 #ifdef FEAT_DIGRAPHS
2215 case Ctrl_K: 2208 case Ctrl_K:
2216 #ifdef FEAT_MOUSE
2217 ignore_drag_release = TRUE; 2209 ignore_drag_release = TRUE;
2218 #endif
2219 putcmdline('?', TRUE); 2210 putcmdline('?', TRUE);
2220 #ifdef USE_ON_FLY_SCROLL 2211 # ifdef USE_ON_FLY_SCROLL
2221 dont_scroll = TRUE; /* disallow scrolling here */ 2212 dont_scroll = TRUE; /* disallow scrolling here */
2222 #endif 2213 # endif
2223 c = get_digraph(TRUE); 2214 c = get_digraph(TRUE);
2224 extra_char = NUL; 2215 extra_char = NUL;
2225 if (c != NUL) 2216 if (c != NUL)
2226 break; 2217 break;
2227 2218
2228 redrawcmd(); 2219 redrawcmd();
2229 goto cmdline_not_changed; 2220 goto cmdline_not_changed;
2230 #endif /* FEAT_DIGRAPHS */ 2221 #endif // FEAT_DIGRAPHS
2231 2222
2232 #ifdef FEAT_RIGHTLEFT 2223 #ifdef FEAT_RIGHTLEFT
2233 case Ctrl__: /* CTRL-_: switch language mode */ 2224 case Ctrl__: /* CTRL-_: switch language mode */
2234 if (!p_ari) 2225 if (!p_ari)
2235 break; 2226 break;