0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.0.0661: recognizing urxvt mouse codes does not work well

Problem:    Recognizing urxvt mouse codes does not work well.
Solution:   Recognize "Esc[*M" and "Esc[*m". (Maurice Bos, closes #1486)
This commit is contained in:
Bram Moolenaar
2017-06-22 22:37:57 +02:00
parent a1fed064d1
commit a529ce068b
5 changed files with 41 additions and 51 deletions

View File

@@ -3771,7 +3771,6 @@ check_mouse_termcode(void)
del_mouse_termcode(KS_PTERM_MOUSE);
# endif
# ifdef FEAT_MOUSE_URXVT
/* same conflict as the dec mouse */
if (use_xterm_mouse() == 3
# ifdef FEAT_GUI
&& !gui.in_use
@@ -3779,8 +3778,8 @@ check_mouse_termcode(void)
)
{
set_mouse_termcode(KS_URXVT_MOUSE, (char_u *)(term_is_8bit(T_NAME)
? IF_EB("\233", CSI_STR)
: IF_EB("\033[", ESC_STR "[")));
? IF_EB("\233*M", CSI_STR "*M")
: IF_EB("\033[*M", ESC_STR "[*M")));
if (*p_mouse != NUL)
{
@@ -3792,7 +3791,6 @@ check_mouse_termcode(void)
del_mouse_termcode(KS_URXVT_MOUSE);
# endif
# ifdef FEAT_MOUSE_SGR
/* There is no conflict with xterm mouse */
if (use_xterm_mouse() == 4
# ifdef FEAT_GUI
&& !gui.in_use
@@ -3800,8 +3798,12 @@ check_mouse_termcode(void)
)
{
set_mouse_termcode(KS_SGR_MOUSE, (char_u *)(term_is_8bit(T_NAME)
? IF_EB("\233<", CSI_STR "<")
: IF_EB("\033[<", ESC_STR "[<")));
? IF_EB("\233<*M", CSI_STR "<*M")
: IF_EB("\033[<*M", ESC_STR "[<*M")));
set_mouse_termcode(KS_SGR_MOUSE_RELEASE, (char_u *)(term_is_8bit(T_NAME)
? IF_EB("\233<*m", CSI_STR "<*m")
: IF_EB("\033[<*m", ESC_STR "[<*m")));
if (*p_mouse != NUL)
{
@@ -3810,7 +3812,10 @@ check_mouse_termcode(void)
}
}
else
{
del_mouse_termcode(KS_SGR_MOUSE);
del_mouse_termcode(KS_SGR_MOUSE_RELEASE);
}
# endif
}
#endif