diff --git a/layout-custom.c b/layout-custom.c index 062a2197..426ecf29 100644 --- a/layout-custom.c +++ b/layout-custom.c @@ -336,7 +336,7 @@ layout_assign(struct window_pane **wp, struct layout_cell *lc, int flags) case LAYOUT_TOPBOTTOM: case LAYOUT_FLOATING: TAILQ_FOREACH(lcchild, &lc->cells, entry) - layout_assign(wp, lcchild, PANE_FLOATING); + layout_assign(wp, lcchild, flags); return; } } diff --git a/screen-redraw.c b/screen-redraw.c index 4301d823..c9f49b3d 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -1280,7 +1280,9 @@ screen_redraw_draw_pane(struct screen_redraw_ctx *ctx, struct window_pane *wp) struct visible_ranges *r; 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) * tty: (0 to tty->sx-1, 0 to tty->sy-1) * pane: (0 to wp->sx-1, 0 to wp->sy-1) diff --git a/tty.c b/tty.c index 9d3ea5fb..2db47cc1 100644 --- a/tty.c +++ b/tty.c @@ -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); } -/* Redraw a line at py of a screen taking into account obscured ranges. - * Menus and popups are always on top, ctx->arg == NULL. - */ +/* Redraw a line of a screen at py. */ static void 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 * 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) 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)) - return; /* Character obscured by floating pane. */ + return; /* Check the output codeset and apply attributes. */ gcp = tty_check_codeset(tty, gc); @@ -2519,15 +2518,19 @@ tty_margin_off(struct tty *tty) static void tty_margin_pane(struct tty *tty, const struct tty_ctx *ctx) { - int l, r; + int l, r; l = ctx->xoff - ctx->wox; r = ctx->xoff + ctx->sx - 1 - ctx->wox; - if (l < 0) l = 0; - if (l > (int)ctx->wsx) l = ctx->wsx; - if (r < 0) r = 0; - if (r > (int)ctx->wsx) r = ctx->wsx; + if (l < 0) + l = 0; + if (l > (int)ctx->wsx) + l = ctx->wsx; + if (r < 0) + r = 0; + if (r > (int)ctx->wsx) + r = ctx->wsx; tty_margin(tty, l, r); }