vim-patch: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.

https://code.google.com/p/vim/source/detail?r=v7-4-305
This commit is contained in:
Scott Prager
2014-09-09 13:13:23 -04:00
parent dc6db20feb
commit 83cd2979a1
4 changed files with 55 additions and 24 deletions

View File

@@ -761,11 +761,11 @@ void mch_setmouse(int on)
}
/*
* Set the mouse termcode, depending on the 'term' and 'ttymouse' options.
*/
/// Sets the mouse termcode, depending on the 'term' and 'ttymouse' options.
void check_mouse_termcode(void)
{
xterm_conflict_mouse = false;
if (use_xterm_mouse()
&& use_xterm_mouse() != 3
) {
@@ -791,29 +791,31 @@ void check_mouse_termcode(void)
else
del_mouse_termcode(KS_NETTERM_MOUSE);
/* 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()) {
set_mouse_termcode(KS_DEC_MOUSE, (char_u *)(term_is_8bit(T_NAME)
? "\233" : "\033["));
else
xterm_conflict_mouse = true;
}
else {
del_mouse_termcode(KS_DEC_MOUSE);
}
/* same as the dec mouse */
if (use_xterm_mouse() == 3
) {
set_mouse_termcode(KS_URXVT_MOUSE, (char_u *)(term_is_8bit(T_NAME)
? "\233"
: "\033["));
if (use_xterm_mouse() == 3 && !did_request_esc_sequence()) {
set_mouse_termcode(KS_URXVT_MOUSE,
(char_u *)(term_is_8bit(T_NAME) ? "\233" : "\033["));
if (*p_mouse != NUL) {
mch_setmouse(FALSE);
mch_setmouse(false);
setmouse();
}
} else
xterm_conflict_mouse = true;
} else {
del_mouse_termcode(KS_URXVT_MOUSE);
/* There is no conflict with xterm mouse */
if (use_xterm_mouse() == 4
) {
}
// There is no conflict with xterm mouse.
if (use_xterm_mouse() == 4) {
set_mouse_termcode(KS_SGR_MOUSE, (char_u *)(term_is_8bit(T_NAME)
? "\233<"
: "\033[<"));
@@ -822,8 +824,9 @@ void check_mouse_termcode(void)
mch_setmouse(FALSE);
setmouse();
}
} else
} else {
del_mouse_termcode(KS_SGR_MOUSE);
}
}
/*