Merge branch 'master' into floating_panes

This commit is contained in:
Nicholas Marriott
2026-05-25 09:21:36 +01:00
3 changed files with 17 additions and 12 deletions

View File

@@ -336,7 +336,7 @@ layout_assign(struct window_pane **wp, struct layout_cell *lc, int flags)
case LAYOUT_TOPBOTTOM: case LAYOUT_TOPBOTTOM:
case LAYOUT_FLOATING: case LAYOUT_FLOATING:
TAILQ_FOREACH(lcchild, &lc->cells, entry) TAILQ_FOREACH(lcchild, &lc->cells, entry)
layout_assign(wp, lcchild, PANE_FLOATING); layout_assign(wp, lcchild, flags);
return; return;
} }
} }

View File

@@ -1280,7 +1280,9 @@ screen_redraw_draw_pane(struct screen_redraw_ctx *ctx, struct window_pane *wp)
struct visible_ranges *r; struct visible_ranges *r;
struct visible_range *ri; struct visible_range *ri;
/* There are 3 coordinate spaces: /*
* There are 3 coordinate spaces:
*
* window: (0 to w->sx-1, 0 to w->sy-1) * window: (0 to w->sx-1, 0 to w->sy-1)
* tty: (0 to tty->sx-1, 0 to tty->sy-1) * tty: (0 to tty->sx-1, 0 to tty->sy-1)
* pane: (0 to wp->sx-1, 0 to wp->sy-1) * pane: (0 to wp->sx-1, 0 to wp->sy-1)

23
tty.c
View File

@@ -1386,9 +1386,7 @@ tty_clear_pane_area(struct tty *tty, const struct tty_ctx *ctx, u_int py,
tty_clear_area(tty, ctx, y, ry, x, rx, bg); tty_clear_area(tty, ctx, y, ry, x, rx, bg);
} }
/* Redraw a line at py of a screen taking into account obscured ranges. /* Redraw a line of a screen at py. */
* Menus and popups are always on top, ctx->arg == NULL.
*/
static void static void
tty_draw_pane(struct tty *tty, const struct tty_ctx *ctx, u_int py) tty_draw_pane(struct tty *tty, const struct tty_ctx *ctx, u_int py)
{ {
@@ -1454,6 +1452,7 @@ tty_draw_pane(struct tty *tty, const struct tty_ctx *ctx, u_int py)
} }
} }
/* Check if character needs to be mapped for codeset. */
const struct grid_cell * const struct grid_cell *
tty_check_codeset(struct tty *tty, const struct grid_cell *gc) tty_check_codeset(struct tty *tty, const struct grid_cell *gc)
{ {
@@ -2402,9 +2401,9 @@ tty_cell(struct tty *tty, const struct grid_cell *gc,
if (gc->flags & GRID_FLAG_PADDING) if (gc->flags & GRID_FLAG_PADDING)
return; return;
/* Check if character is covered by overlay/floating pane. */ /* Check if character is covered by overlay or floating pane. */
if (!tty_check_overlay(tty, tty->cx, tty->cy)) if (!tty_check_overlay(tty, tty->cx, tty->cy))
return; /* Character obscured by floating pane. */ return;
/* Check the output codeset and apply attributes. */ /* Check the output codeset and apply attributes. */
gcp = tty_check_codeset(tty, gc); gcp = tty_check_codeset(tty, gc);
@@ -2519,15 +2518,19 @@ tty_margin_off(struct tty *tty)
static void static void
tty_margin_pane(struct tty *tty, const struct tty_ctx *ctx) tty_margin_pane(struct tty *tty, const struct tty_ctx *ctx)
{ {
int l, r; int l, r;
l = ctx->xoff - ctx->wox; l = ctx->xoff - ctx->wox;
r = ctx->xoff + ctx->sx - 1 - ctx->wox; r = ctx->xoff + ctx->sx - 1 - ctx->wox;
if (l < 0) l = 0; if (l < 0)
if (l > (int)ctx->wsx) l = ctx->wsx; l = 0;
if (r < 0) r = 0; if (l > (int)ctx->wsx)
if (r > (int)ctx->wsx) r = ctx->wsx; l = ctx->wsx;
if (r < 0)
r = 0;
if (r > (int)ctx->wsx)
r = ctx->wsx;
tty_margin(tty, l, r); tty_margin(tty, l, r);
} }