mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
updated for version 7.4.305
Problem: Making 'ttymouse' empty after the xterm version was requested causes problems. (Elijah Griffin) Solution: Do not check for DEC mouse sequences when the xterm version was requested. Also don't request the xterm version when DEC mouse was enabled.
This commit is contained in:
@@ -3667,6 +3667,8 @@ mch_setmouse(on)
|
||||
void
|
||||
check_mouse_termcode()
|
||||
{
|
||||
xterm_conflict_mouse = FALSE;
|
||||
|
||||
# ifdef FEAT_MOUSE_XTERM
|
||||
if (use_xterm_mouse()
|
||||
# ifdef FEAT_MOUSE_URXVT
|
||||
@@ -3711,7 +3713,7 @@ check_mouse_termcode()
|
||||
# endif
|
||||
|
||||
# ifdef FEAT_MOUSE_JSB
|
||||
/* conflicts with xterm mouse: "\033[" and "\033[M" ??? */
|
||||
/* There is no conflict, but it was disabled for xterm before. */
|
||||
if (!use_xterm_mouse()
|
||||
# ifdef FEAT_GUI
|
||||
&& !gui.in_use
|
||||
@@ -3738,32 +3740,40 @@ check_mouse_termcode()
|
||||
# endif
|
||||
|
||||
# ifdef FEAT_MOUSE_DEC
|
||||
/* conflicts with xterm mouse: "\033[" and "\033[M" */
|
||||
if (!use_xterm_mouse()
|
||||
/* Conflicts with xterm mouse: "\033[" and "\033[M".
|
||||
* Also conflicts with the xterm termresponse, skip this if it was
|
||||
* requested already. */
|
||||
if (!use_xterm_mouse() && !did_request_esc_sequence()
|
||||
# ifdef FEAT_GUI
|
||||
&& !gui.in_use
|
||||
# endif
|
||||
)
|
||||
{
|
||||
set_mouse_termcode(KS_DEC_MOUSE, (char_u *)(term_is_8bit(T_NAME)
|
||||
? IF_EB("\233", CSI_STR) : IF_EB("\033[", ESC_STR "[")));
|
||||
xterm_conflict_mouse = TRUE;
|
||||
}
|
||||
else
|
||||
del_mouse_termcode(KS_DEC_MOUSE);
|
||||
# endif
|
||||
# ifdef FEAT_MOUSE_PTERM
|
||||
/* same as the dec mouse */
|
||||
if (!use_xterm_mouse()
|
||||
if (!use_xterm_mouse() && !did_request_esc_sequence()
|
||||
# ifdef FEAT_GUI
|
||||
&& !gui.in_use
|
||||
# endif
|
||||
)
|
||||
{
|
||||
set_mouse_termcode(KS_PTERM_MOUSE,
|
||||
(char_u *) IF_EB("\033[", ESC_STR "["));
|
||||
xterm_conflict_mouse = TRUE;
|
||||
}
|
||||
else
|
||||
del_mouse_termcode(KS_PTERM_MOUSE);
|
||||
# endif
|
||||
# ifdef FEAT_MOUSE_URXVT
|
||||
/* same as the dec mouse */
|
||||
if (use_xterm_mouse() == 3
|
||||
if (use_xterm_mouse() == 3 && !did_request_esc_sequence()
|
||||
# ifdef FEAT_GUI
|
||||
&& !gui.in_use
|
||||
# endif
|
||||
@@ -3778,6 +3788,7 @@ check_mouse_termcode()
|
||||
mch_setmouse(FALSE);
|
||||
setmouse();
|
||||
}
|
||||
xterm_conflict_mouse = TRUE;
|
||||
}
|
||||
else
|
||||
del_mouse_termcode(KS_URXVT_MOUSE);
|
||||
|
Reference in New Issue
Block a user