comparison src/ui.c @ 13448:a62b0bbc8834 v8.0.1598

patch 8.0.1598: cannot select text in a terminal with the mouse commit https://github.com/vim/vim/commit/c48369c3fc507f398abbc933a60f653c6abe6701 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 11 19:30:45 2018 +0100 patch 8.0.1598: cannot select text in a terminal with the mouse Problem: Cannot select text in a terminal with the mouse. Solution: When a job in a terminal is not consuming mouse events, use them for modeless selection. Also stop Insert mode when clicking in a terminal window.
author Christian Brabandt <cb@256bit.org>
date Sun, 11 Mar 2018 19:45:05 +0100
parents 69517d67421f
children 63679d671ced
comparison
equal deleted inserted replaced
13447:17eebaa3188f 13448:a62b0bbc8834
2825 /* Only change window focus when not clicking on or dragging the 2825 /* Only change window focus when not clicking on or dragging the
2826 * status line. Do change focus when releasing the mouse button 2826 * status line. Do change focus when releasing the mouse button
2827 * (MOUSE_FOCUS was set above if we dragged first). */ 2827 * (MOUSE_FOCUS was set above if we dragged first). */
2828 if (dragwin == NULL || (flags & MOUSE_RELEASED)) 2828 if (dragwin == NULL || (flags & MOUSE_RELEASED))
2829 win_enter(wp, TRUE); /* can make wp invalid! */ 2829 win_enter(wp, TRUE); /* can make wp invalid! */
2830
2831 if (curwin != old_curwin)
2832 {
2830 #ifdef CHECK_DOUBLE_CLICK 2833 #ifdef CHECK_DOUBLE_CLICK
2831 /* set topline, to be able to check for double click ourselves */ 2834 /* set topline, to be able to check for double click ourselves */
2832 if (curwin != old_curwin)
2833 set_mouse_topline(curwin); 2835 set_mouse_topline(curwin);
2834 #endif 2836 #endif
2837 #ifdef FEAT_TERMINAL
2838 /* when entering a terminal window may change state */
2839 term_win_entered();
2840 #endif
2841 }
2835 if (on_status_line) /* In (or below) status line */ 2842 if (on_status_line) /* In (or below) status line */
2836 { 2843 {
2837 /* Don't use start_arrow() if we're in the same window */ 2844 /* Don't use start_arrow() if we're in the same window */
2838 if (curwin == old_curwin) 2845 if (curwin == old_curwin)
2839 return IN_STATUS_LINE; 2846 return IN_STATUS_LINE;