Skip to content

Commit

Permalink
The patch without any whitespace fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
unphased committed May 13, 2013
1 parent f3188ab commit bbcedf5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions terminal.c
Original file line number Diff line number Diff line change
Expand Up @@ -5879,8 +5879,8 @@ void term_mouse(Terminal *term, Mouse_Button braw, Mouse_Button bcooked,
term->mouse_is_down = 0;
break;
case MA_CLICK:
if (term->mouse_is_down == braw) {// HACK: ADDED FOR hyperlink stuff
unlineptr(ldata);
if (term->mouse_is_down == braw && braw != MBT_WHEEL_UP && braw != MBT_WHEEL_DOWN) {// HACK: ADDED FOR hyperlink stuff // MORE HACKING (@unphased: allow sequences of mouse wheel up and mouse wheel down to pass through)
unlineptr(ldata);
return;
}
term->mouse_is_down = braw;
Expand Down
9 changes: 5 additions & 4 deletions windows/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -3292,10 +3292,11 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
TO_CHR_X(p.x),
TO_CHR_Y(p.y), shift_pressed,
control_pressed, is_alt_pressed());
term_mouse(term, b, translate_button(b),
MA_RELEASE, TO_CHR_X(p.x),
TO_CHR_Y(p.y), shift_pressed,
control_pressed, is_alt_pressed());
// HACK (@unphased: I am removing the "button release" when triggered by mouse wheel to better replicate iTerm2's behavior)
// term_mouse(term, b, translate_button(b),
// MA_RELEASE, TO_CHR_X(p.x),
// TO_CHR_Y(p.y), shift_pressed,
// control_pressed, is_alt_pressed());
} /* else: not sure when this can fail */
} else {
/* trigger a scroll */
Expand Down

0 comments on commit bbcedf5

Please sign in to comment.