mirror of
https://github.com/tmux/tmux.git
synced 2026-01-12 09:20:22 +00:00
Fix mouse drag in copy-mode to properly select around floating panes.
This commit is contained in:
6
tty.c
6
tty.c
@@ -2248,10 +2248,11 @@ tty_cmd_cell(struct tty *tty, const struct tty_ctx *ctx)
|
|||||||
(gcp->data.width == 1 && !tty_check_overlay(tty, px, py)))
|
(gcp->data.width == 1 && !tty_check_overlay(tty, px, py)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Handle partially obstructed wide characters. */
|
|
||||||
if (gcp->data.width > 1) {
|
|
||||||
vr = screen_redraw_get_visible_ranges(wp, px, py,
|
vr = screen_redraw_get_visible_ranges(wp, px, py,
|
||||||
gcp->data.width);
|
gcp->data.width);
|
||||||
|
|
||||||
|
/* Handle partially obstructed wide characters. */
|
||||||
|
if (gcp->data.width > 1) {
|
||||||
for (i = 0; i < vr->used; i++)
|
for (i = 0; i < vr->used; i++)
|
||||||
vis2 += vr->nx[i];
|
vis2 += vr->nx[i];
|
||||||
tty_check_overlay_range(tty, px, py, gcp->data.width, &r);
|
tty_check_overlay_range(tty, px, py, gcp->data.width, &r);
|
||||||
@@ -2273,6 +2274,7 @@ tty_cmd_cell(struct tty *tty, const struct tty_ctx *ctx)
|
|||||||
tty_margin_off(tty);
|
tty_margin_off(tty);
|
||||||
tty_cursor_pane_unless_wrap(tty, ctx, ctx->ocx, ctx->ocy);
|
tty_cursor_pane_unless_wrap(tty, ctx, ctx->ocx, ctx->ocy);
|
||||||
|
|
||||||
|
if (screen_redraw_is_visible(vr, px))
|
||||||
tty_cell(tty, ctx->cell, &ctx->defaults, ctx->palette,
|
tty_cell(tty, ctx->cell, &ctx->defaults, ctx->palette,
|
||||||
ctx->s->hyperlinks);
|
ctx->s->hyperlinks);
|
||||||
|
|
||||||
|
|||||||
@@ -5810,6 +5810,9 @@ window_copy_drag_update(struct client *c, struct mouse_event *m)
|
|||||||
if (c == NULL)
|
if (c == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (c->tty.mouse_wp != NULL)
|
||||||
|
wp = c->tty.mouse_wp;
|
||||||
|
else
|
||||||
wp = cmd_mouse_pane(m, NULL, NULL);
|
wp = cmd_mouse_pane(m, NULL, NULL);
|
||||||
if (wp == NULL)
|
if (wp == NULL)
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user