mirror of
https://github.com/tmux/tmux.git
synced 2025-12-18 00:02:54 -05:00
Bugfix floating panes display when off window edge.
This commit is contained in:
parent
6dd552d689
commit
9a061a2fee
@ -1084,6 +1084,7 @@ screen_redraw_draw_pane(struct screen_redraw_ctx *ctx, struct window_pane *wp)
|
|||||||
continue;
|
continue;
|
||||||
y = top + wp->yoff + j - ctx->oy;
|
y = top + wp->yoff + j - ctx->oy;
|
||||||
|
|
||||||
|
/* xxx i apparenty unneeded now that the vr array returns where in s to read from. */
|
||||||
if (wp->xoff >= ctx->ox &&
|
if (wp->xoff >= ctx->ox &&
|
||||||
wp->xoff + wp->sx <= ctx->ox + ctx->sx) {
|
wp->xoff + wp->sx <= ctx->ox + ctx->sx) {
|
||||||
/* All visible. */
|
/* All visible. */
|
||||||
@ -1120,8 +1121,8 @@ screen_redraw_draw_pane(struct screen_redraw_ctx *ctx, struct window_pane *wp)
|
|||||||
continue;
|
continue;
|
||||||
/* i is px of cell, add px of region, sub the
|
/* i is px of cell, add px of region, sub the
|
||||||
pane offset. If you don't sub offset,
|
pane offset. If you don't sub offset,
|
||||||
contents of pane shifted. */
|
contents of pane shifted. note: i apparently unnec. */
|
||||||
tty_draw_line(tty, s, i + vr->px[r] - wp->xoff, j,
|
tty_draw_line(tty, s, /* i + */ vr->px[r] - wp->xoff, j,
|
||||||
vr->nx[r], vr->px[r], y, &defaults, palette);
|
vr->nx[r], vr->px[r], y, &defaults, palette);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2018,7 +2018,7 @@ screen_write_cell(struct screen_write_ctx *ctx, const struct grid_cell *gc)
|
|||||||
struct window *w;
|
struct window *w;
|
||||||
u_int found_self, px, py;
|
u_int found_self, px, py;
|
||||||
|
|
||||||
|
/* early attempt.
|
||||||
if (base_wp != NULL) {
|
if (base_wp != NULL) {
|
||||||
w = base_wp->window;
|
w = base_wp->window;
|
||||||
px = ctx->s->cx;
|
px = ctx->s->cx;
|
||||||
@ -2035,7 +2035,7 @@ screen_write_cell(struct screen_write_ctx *ctx, const struct grid_cell *gc)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
/* Ignore padding cells. */
|
/* Ignore padding cells. */
|
||||||
if (gc->flags & GRID_FLAG_PADDING)
|
if (gc->flags & GRID_FLAG_PADDING)
|
||||||
return;
|
return;
|
||||||
|
|||||||
11
window.c
11
window.c
@ -599,7 +599,8 @@ struct window_pane *
|
|||||||
window_get_active_at(struct window *w, u_int x, u_int y)
|
window_get_active_at(struct window *w, u_int x, u_int y)
|
||||||
{
|
{
|
||||||
struct window_pane *wp;
|
struct window_pane *wp;
|
||||||
u_int xoff, yoff, sx, sy;
|
int xoff, yoff;
|
||||||
|
u_int sx, sy;
|
||||||
|
|
||||||
TAILQ_FOREACH(wp, &w->z_index, zentry) {
|
TAILQ_FOREACH(wp, &w->z_index, zentry) {
|
||||||
if (!window_pane_visible(wp))
|
if (!window_pane_visible(wp))
|
||||||
@ -608,15 +609,15 @@ window_get_active_at(struct window *w, u_int x, u_int y)
|
|||||||
if (wp->layout_cell != NULL) {
|
if (wp->layout_cell != NULL) {
|
||||||
/* Tiled, select up to including bottom or
|
/* Tiled, select up to including bottom or
|
||||||
right border. */
|
right border. */
|
||||||
if (x < xoff || x > xoff + sx)
|
if ((int)x < xoff || x > xoff + sx)
|
||||||
continue;
|
continue;
|
||||||
if (y < yoff || y > yoff + sy)
|
if ((int)y < yoff || y > yoff + sy)
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
/* Floating, include top or or left border. */
|
/* Floating, include top or or left border. */
|
||||||
if (x < xoff - 1 || x > xoff + sx)
|
if ((int)x < xoff - 1 || x > xoff + sx)
|
||||||
continue;
|
continue;
|
||||||
if (y < yoff - 1 || y > yoff + sy)
|
if ((int)y < yoff - 1 || y > yoff + sy)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
return (wp);
|
return (wp);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user