forked from aniani/vim
patch 7.4.2238
Problem: With SGR mouse reporting (suckless terminal) the mouse release and scroll up/down is confused. Solution: Don't see a release as a scroll up/down. (Ralph Eastwood)
This commit is contained in:
10
src/term.c
10
src/term.c
@@ -4939,7 +4939,7 @@ check_termcode(
|
|||||||
button = getdigits(&p);
|
button = getdigits(&p);
|
||||||
mouse_code = 0;
|
mouse_code = 0;
|
||||||
|
|
||||||
switch( button )
|
switch (button)
|
||||||
{
|
{
|
||||||
case 4: mouse_code = MOUSE_LEFT; break;
|
case 4: mouse_code = MOUSE_LEFT; break;
|
||||||
case 1: mouse_code = MOUSE_RIGHT; break;
|
case 1: mouse_code = MOUSE_RIGHT; break;
|
||||||
@@ -4947,7 +4947,7 @@ check_termcode(
|
|||||||
default: return -1;
|
default: return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch( action )
|
switch (action)
|
||||||
{
|
{
|
||||||
case 31: /* Initial press */
|
case 31: /* Initial press */
|
||||||
if (*p++ != ';')
|
if (*p++ != ';')
|
||||||
@@ -5096,9 +5096,11 @@ check_termcode(
|
|||||||
else if (orig_num_clicks == 4)
|
else if (orig_num_clicks == 4)
|
||||||
modifiers |= MOD_MASK_4CLICK;
|
modifiers |= MOD_MASK_4CLICK;
|
||||||
|
|
||||||
/* Work out our pseudo mouse event */
|
/* Work out our pseudo mouse event. Note that MOUSE_RELEASE gets
|
||||||
|
* added, then it's not mouse up/down. */
|
||||||
key_name[0] = (int)KS_EXTRA;
|
key_name[0] = (int)KS_EXTRA;
|
||||||
if (wheel_code != 0)
|
if (wheel_code != 0
|
||||||
|
&& (wheel_code & MOUSE_RELEASE) != MOUSE_RELEASE)
|
||||||
{
|
{
|
||||||
if (wheel_code & MOUSE_CTRL)
|
if (wheel_code & MOUSE_CTRL)
|
||||||
modifiers |= MOD_MASK_CTRL;
|
modifiers |= MOD_MASK_CTRL;
|
||||||
|
@@ -763,6 +763,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2238,
|
||||||
/**/
|
/**/
|
||||||
2237,
|
2237,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user