mirror of
https://github.com/tmux/tmux.git
synced 2025-01-14 20:58:53 +00:00
Do not store the mouse position we calculate as the start of a drag back
into the mouse event that later code uses, it has been adjusted and they should use the original position. GitHub issue 1710.
This commit is contained in:
parent
84e4652513
commit
4097257bef
@ -143,7 +143,7 @@ cmd_resize_pane_mouse_update(struct client *c, struct mouse_event *m)
|
||||
}
|
||||
w = wl->window;
|
||||
|
||||
y = m->y; x = m->x;
|
||||
y = m->y + m->oy; x = m->x + m->ox;
|
||||
if (m->statusat == 0 && y > 0)
|
||||
y--;
|
||||
else if (m->statusat > 0 && y >= (u_int)m->statusat)
|
||||
|
4
cmd.c
4
cmd.c
@ -484,8 +484,8 @@ cmd_mouse_at(struct window_pane *wp, struct mouse_event *m, u_int *xp,
|
||||
x = m->lx + m->ox;
|
||||
y = m->ly + m->oy;
|
||||
} else {
|
||||
x = m->x;
|
||||
y = m->y;
|
||||
x = m->x + m->ox;
|
||||
y = m->y + m->oy;
|
||||
}
|
||||
log_debug("%s: x=%u, y=%u%s", __func__, x, y, last ? " (last)" : "");
|
||||
|
||||
|
@ -448,6 +448,8 @@ server_client_check_mouse(struct client *c, struct key_event *event)
|
||||
type = DRAG;
|
||||
if (c->tty.mouse_drag_flag) {
|
||||
x = m->x, y = m->y, b = m->b;
|
||||
if (x == m->lx && y == m->ly)
|
||||
return (KEYC_UNKNOWN);
|
||||
log_debug("drag update at %u,%u", x, y);
|
||||
} else {
|
||||
x = m->lx, y = m->ly, b = m->lb;
|
||||
@ -555,8 +557,6 @@ have_event:
|
||||
return (KEYC_UNKNOWN);
|
||||
px = px + m->ox;
|
||||
py = py + m->oy;
|
||||
m->x = x + m->ox;
|
||||
m->y = y + m->oy;
|
||||
|
||||
/* Try the pane borders if not zoomed. */
|
||||
if (~s->curw->window->flags & WINDOW_ZOOMED) {
|
||||
|
@ -3505,6 +3505,8 @@ window_copy_start_drag(struct client *c, struct mouse_event *m)
|
||||
window_copy_update_cursor(wme, x, y);
|
||||
window_copy_start_selection(wme);
|
||||
window_copy_redraw_screen(wme);
|
||||
|
||||
window_copy_drag_update(c, m);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user