Skip to content

Commit

Permalink
patch 9.0.0136: after CTRL-Left-mouse click a mouse scroll also has CTRL
Browse files Browse the repository at this point in the history
Problem:    After CTRL-Left-mouse click a mouse scroll also has CTRL.
Solution:   Reset orig_mouse_code also for wheel events. (closes #10840)
  • Loading branch information
brammool committed Aug 3, 2022
1 parent 0b0ccbb commit d6212b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/mouse.c
Expand Up @@ -2403,7 +2403,7 @@ check_termcode_mouse(
// Apparently 0x23 and 0x24 are used by rxvt scroll wheel.
// And 0x40 and 0x41 are used by some xterm emulator.
wheel_code = mouse_code - (mouse_code >= 0x40 ? 0x40 : 0x23)
+ MOUSEWHEEL_LOW;
+ MOUSEWHEEL_LOW;
}
# endif

Expand Down Expand Up @@ -2788,8 +2788,10 @@ check_termcode_mouse(
is_drag = TRUE;
current_button = held_button;
}
else if (wheel_code == 0)
else
{
if (wheel_code == 0)
{
# ifdef CHECK_DOUBLE_CLICK
# ifdef FEAT_MOUSE_GPM
/*
Expand Down Expand Up @@ -2849,7 +2851,8 @@ check_termcode_mouse(
orig_num_clicks = NUM_MOUSE_CLICKS(mouse_code);
# endif
is_click = TRUE;
orig_mouse_code = mouse_code;
}
orig_mouse_code = mouse_code;
}
if (!is_drag)
held_button = mouse_code & MOUSE_CLICK_MASK;
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -735,6 +735,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
136,
/**/
135,
/**/
Expand Down

0 comments on commit d6212b8

Please sign in to comment.