mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 19:39:04 +00:00
Only exit mouse mode on scroll wheel when actually reaching the end of
the history, from James Nylen.
This commit is contained in:
parent
cd8e536c43
commit
c11da7ca88
@ -822,7 +822,7 @@ window_copy_mouse(
|
|||||||
{
|
{
|
||||||
struct window_copy_mode_data *data = wp->modedata;
|
struct window_copy_mode_data *data = wp->modedata;
|
||||||
struct screen *s = &data->screen;
|
struct screen *s = &data->screen;
|
||||||
u_int i, old_cy;
|
u_int i;
|
||||||
|
|
||||||
if (m->x >= screen_size_x(s))
|
if (m->x >= screen_size_x(s))
|
||||||
return;
|
return;
|
||||||
@ -835,10 +835,9 @@ window_copy_mouse(
|
|||||||
for (i = 0; i < 5; i++)
|
for (i = 0; i < 5; i++)
|
||||||
window_copy_cursor_up(wp, 0);
|
window_copy_cursor_up(wp, 0);
|
||||||
} else if ((m->b & MOUSE_BUTTON) == MOUSE_2) {
|
} else if ((m->b & MOUSE_BUTTON) == MOUSE_2) {
|
||||||
old_cy = data->cy;
|
|
||||||
for (i = 0; i < 5; i++)
|
for (i = 0; i < 5; i++)
|
||||||
window_copy_cursor_down(wp, 0);
|
window_copy_cursor_down(wp, 0);
|
||||||
if (old_cy == data->cy)
|
if (data->oy == 0)
|
||||||
goto reset_mode;
|
goto reset_mode;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user