Merge branch 'floating_panes' into floating_panes_staging

This commit is contained in:
Nicholas Marriott
2026-05-24 10:06:33 +01:00
7 changed files with 380 additions and 92 deletions

View File

@@ -289,7 +289,7 @@ layout_parse(struct window *w, const char *layout, char **cause)
if (floating_lc != NULL)
layout_assign(&wp, floating_lc, PANE_FLOATING);
/* Fix pane Z indexes. */
/* Fix pane z-indexes. */
while (!TAILQ_EMPTY(&w->z_index)) {
wp = TAILQ_FIRST(&w->z_index);
TAILQ_REMOVE(&w->z_index, wp, zentry);
@@ -305,7 +305,6 @@ layout_parse(struct window *w, const char *layout, char **cause)
layout_print_cell(tiled_lc, __func__, 0);
/* Free the floating layout cell, no longer needed. */
if (floating_lc != NULL)
layout_free_cell(floating_lc);
notify_window("window-layout-changed", w);

View File

@@ -78,6 +78,9 @@ layout_free_cell(struct layout_cell *lc)
{
struct layout_cell *lcchild;
if (lc == NULL)
return;
switch (lc->type) {
case LAYOUT_LEFTRIGHT:
case LAYOUT_TOPBOTTOM:
@@ -233,7 +236,7 @@ layout_make_node(struct layout_cell *lc, enum layout_type type)
lc->wp = NULL;
}
/* Fix Z indexes. */
/* Fix z-indexes. */
void
layout_fix_zindexes(struct window *w, struct layout_cell *lc)
{

View File

@@ -713,10 +713,8 @@ screen_redraw_draw_pane_status(struct screen_redraw_ctx *ctx)
}
r = screen_redraw_get_visible_ranges(wp, x, yoff, width, NULL);
if (ctx->statustop)
yoff += ctx->statuslines;
for (i = 0; i < r->used; i++) {
ri = &r->ranges[i];
if (ri->nx == 0)
@@ -1267,7 +1265,6 @@ screen_redraw_get_visible_ranges(struct window_pane *base_wp, u_int px,
return (r);
}
/* Draw one pane. */
static void
screen_redraw_draw_pane(struct screen_redraw_ctx *ctx, struct window_pane *wp)
@@ -1278,7 +1275,7 @@ screen_redraw_draw_pane(struct screen_redraw_ctx *ctx, struct window_pane *wp)
struct screen *s = wp->screen;
struct colour_palette *palette = &wp->palette;
struct grid_cell defaults;
u_int i, j, woy, wx, wy, px, py, width;
u_int i, j, woy, wx, wy, py, width;
struct visible_ranges *r;
struct visible_range *ri;
@@ -1291,25 +1288,20 @@ screen_redraw_draw_pane(struct screen_redraw_ctx *ctx, struct window_pane *wp)
wp->xoff >= (int)ctx->ox + (int)ctx->sx)
return;
/* woy is window y offset in tty. */
if (ctx->statustop)
woy = ctx->statuslines;
else
woy = 0;
for (j = 0; j < wp->sy; j++) {
if (wp->yoff + (int)j < (int)ctx->oy ||
wp->yoff + (int)j >= (int)ctx->oy + (int)ctx->sy)
continue;
wy = wp->yoff + j; /* y line within window w. */
py = woy + wy - ctx->oy; /* y line within tty. */
if (py > tty->sy)
wy = wp->yoff + j; /* y line within window w */
py = woy + wy - ctx->oy; /* y line within tty */
if (py > tty->sy) {
/* Continue if this line is off of tty. */
continue;
/* Note: i is apparenty not used now that the vr array
* returns where in s to read from.
*/
}
if (wp->xoff >= (int)ctx->ox &&
wp->xoff + (int)wp->sx <= (int)ctx->ox + (int)ctx->sx) {
/* All visible. */
@@ -1338,16 +1330,13 @@ screen_redraw_draw_pane(struct screen_redraw_ctx *ctx, struct window_pane *wp)
/* Get visible ranges of line before we draw it. */
r = screen_redraw_get_visible_ranges(wp, wx, wy, width, NULL);
tty_default_colours(&defaults, wp);
for (i=0; i < r->used; i++) {
for (i = 0; i < r->used; i++) {
ri = &r->ranges[i];
if (ri->nx == 0)
continue;
px = ri->px;
tty_draw_line(tty, s, ri->px - wp->xoff, j,
ri->nx, px, py, &defaults, palette);
tty_draw_line(tty, s, ri->px - wp->xoff, j, ri->nx,
ri->px, py, &defaults, palette);
}
}
@@ -1442,8 +1431,8 @@ screen_redraw_draw_scrollbar(struct screen_redraw_ctx *ctx,
struct visible_ranges *r;
/*
* Size and offset of window relative to tty.
* Status at top offsets window downward.
* Size and offset of window relative to tty. Status at top offsets
* window downward.
*/
sx = ctx->sx;
sy = tty->sy - ctx->statuslines;
@@ -1451,8 +1440,8 @@ screen_redraw_draw_scrollbar(struct screen_redraw_ctx *ctx,
oy = ctx->oy;
if (ctx->statustop) {
sb_y += ctx->statuslines;
sy += ctx->statuslines; /* Height of window in tty. */
oy += ctx->statuslines; /* Top of window in tty. */
sy += ctx->statuslines; /* height of window */
oy += ctx->statuslines; /* top of window */
}
gc = sb_style->gc;
@@ -1460,17 +1449,20 @@ screen_redraw_draw_scrollbar(struct screen_redraw_ctx *ctx,
slgc.fg = gc.bg;
slgc.bg = gc.fg;
if (sb_x + (int)sb_w < 0 || sb_x >= sx || sb_y >= sy)
/* Whole sb off screen. */
if (sb_x + (int)sb_w < 0 || sb_x >= sx || sb_y >= sy) {
/* Whole scrollbar is off screen. */
return;
if (sb_x < 0)
/* Part of sb on screen. */
}
if (sb_x < 0) {
/* Part of scrollbar on screen. */
imin = - sb_x;
}
imax = sb_w + sb_pad;
if ((int)imax + sb_x > sx) {
if (sb_x > sx)
/* Whole sb off screen. */
if (sb_x > sx) {
/* Whole scrollbar off screen. */
return;
}
imax = sx - sb_x;
}
jmax = sb_h;
@@ -1485,34 +1477,37 @@ screen_redraw_draw_scrollbar(struct screen_redraw_ctx *ctx,
* subtracting the pan offset oy.
*/
sb_tty_y = sb_y - oy; /* scrollbar top in tty coordinates */
if (sb_tty_y > (int)sy)
/* Whole sb off screen. */
if (sb_tty_y > (int)sy) {
/* Whole scrollbar is off screen. */
return;
if (sb_tty_y < 0)
}
if (sb_tty_y < 0) {
/* Scrollbar starts above visible area; skip those rows. */
jmin = -sb_tty_y;
if (sb_tty_y + (int)sb_h <= 0)
/* Whole sb above visible area. */
}
if (sb_tty_y + (int)sb_h <= 0) {
/* Whole scrollbar above visible area. */
return;
}
jmax = sb_h;
if (sb_tty_y + (int)jmax > (int)sy)
if (sb_tty_y + (int)jmax > (int)sy) {
/* Clip to height of tty. */
jmax = sy - sb_tty_y;
}
for (j = jmin; j < jmax; j++) {
wy = sb_y + j; /* window y coordinate. */
py = sb_tty_y + j; /* tty y coordinate. */
wy = sb_y + j; /* window y coordinate */
py = sb_tty_y + j;/* tty y coordinate */
r = tty_check_overlay_range(tty, sb_x, wy, imax);
r = screen_redraw_get_visible_ranges(wp, sb_x, wy, imax, r);
for (i = imin; i < imax; i++) {
px = sb_x + ox + i; /* tty x coordinate. */
wx = sb_x + i; /* window x coordinate. */
px = sb_x + ox + i; /* tty x coordinate */
wx = sb_x + i; /* window x coordinate */
if (wx < xoff - (int)sb_w - (int)sb_pad ||
px >= sx || px < 0 ||
wy < yoff - 1 ||
py >= sy || py < 0 ||
! screen_redraw_is_visible(r, wx))
!screen_redraw_is_visible(r, wx))
continue;
tty_cursor(tty, px, py);
if ((sb_pos == PANE_SCROLLBARS_LEFT &&

View File

@@ -1115,7 +1115,9 @@ screen_write_alignmenttest(struct screen_write_ctx *ctx)
struct screen *s = ctx->s;
struct tty_ctx ttyctx;
struct grid_cell gc;
u_int xx, yy;
u_int xx, yy, sx, xoff, yoff, cx, i, n;
struct visible_ranges *r;
struct visible_range *ri;
memcpy(&gc, &grid_default_cell, sizeof gc);
utf8_set(&gc.data, 'E');
@@ -1138,7 +1140,33 @@ screen_write_alignmenttest(struct screen_write_ctx *ctx)
screen_write_initctx(ctx, &ttyctx, 1, 1);
screen_write_collect_clear(ctx, 0, screen_size_y(s) - 1);
if (~ttyctx.flags & TTY_CTX_PANE_OBSCURED || ctx->wp == NULL) {
tty_write(tty_cmd_alignmenttest, &ttyctx);
return;
}
sx = screen_size_x(s);
xoff = ctx->wp->xoff;
yoff = ctx->wp->yoff;
for (yy = 0; yy < screen_size_y(s); yy++) {
r = screen_redraw_get_visible_ranges(ctx->wp,
xoff, yoff + yy, sx, NULL);
for (i = 0; i < r->used; i++) {
ri = &r->ranges[i];
if (ri->nx == 0)
continue;
cx = ri->px - xoff;
for (n = 0; n < ri->nx && cx < sx; n++, cx++) {
ttyctx.ocx = cx;
ttyctx.ocy = yy;
ttyctx.cell = &gc;
tty_write(tty_cmd_cell, &ttyctx);
}
}
}
}
/* Insert nx characters. */
@@ -1147,6 +1175,10 @@ screen_write_insertcharacter(struct screen_write_ctx *ctx, u_int nx, u_int bg)
{
struct screen *s = ctx->s;
struct tty_ctx ttyctx;
u_int sx, xoff, yoff, cx, n, i;
struct visible_ranges *r;
struct visible_range *ri;
struct grid_cell gc;
if (nx == 0)
nx = 1;
@@ -1171,7 +1203,32 @@ screen_write_insertcharacter(struct screen_write_ctx *ctx, u_int nx, u_int bg)
screen_write_collect_flush(ctx, 0, __func__);
ttyctx.n = nx;
if (~ttyctx.flags & TTY_CTX_PANE_OBSCURED || ctx->wp == NULL) {
tty_write(tty_cmd_insertcharacter, &ttyctx);
return;
}
xoff = ctx->wp->xoff;
yoff = ctx->wp->yoff;
sx = screen_size_x(s);
r = screen_redraw_get_visible_ranges(ctx->wp,
xoff + s->cx, yoff + s->cy, sx - s->cx, NULL);
for (i = 0; i < r->used; i++) {
ri = &r->ranges[i];
if (ri->nx == 0)
continue;
cx = ri->px - xoff;
for (n = 0; n < ri->nx && cx < sx; n++, cx++) {
grid_view_get_cell(s->grid, cx, s->cy, &gc);
screen_write_set_cursor(ctx, cx, -1);
ttyctx.cell = &gc;
tty_write(tty_cmd_cell, &ttyctx);
}
}
}
/* Delete nx characters. */
@@ -1180,6 +1237,10 @@ screen_write_deletecharacter(struct screen_write_ctx *ctx, u_int nx, u_int bg)
{
struct screen *s = ctx->s;
struct tty_ctx ttyctx;
u_int sx, xoff, yoff, cx, n, i;
struct visible_ranges *r;
struct visible_range *ri;
struct grid_cell gc;
if (nx == 0)
nx = 1;
@@ -1204,7 +1265,32 @@ screen_write_deletecharacter(struct screen_write_ctx *ctx, u_int nx, u_int bg)
screen_write_collect_flush(ctx, 0, __func__);
ttyctx.n = nx;
if (~ttyctx.flags & TTY_CTX_PANE_OBSCURED || ctx->wp == NULL) {
tty_write(tty_cmd_deletecharacter, &ttyctx);
return;
}
xoff = ctx->wp->xoff;
yoff = ctx->wp->yoff;
sx = screen_size_x(s);
r = screen_redraw_get_visible_ranges(ctx->wp,
xoff + s->cx, yoff + s->cy, sx - s->cx, NULL);
for (i = 0; i < r->used; i++) {
ri = &r->ranges[i];
if (ri->nx == 0)
continue;
cx = ri->px - xoff;
for (n = 0; n < ri->nx && cx < sx; n++, cx++) {
grid_view_get_cell(s->grid, cx, s->cy, &gc);
screen_write_set_cursor(ctx, cx, -1);
ttyctx.cell = &gc;
tty_write(tty_cmd_cell, &ttyctx);
}
}
}
/* Clear nx characters. */
@@ -1213,6 +1299,10 @@ screen_write_clearcharacter(struct screen_write_ctx *ctx, u_int nx, u_int bg)
{
struct screen *s = ctx->s;
struct tty_ctx ttyctx;
u_int sx, xoff, yoff, cx, n, i;
struct visible_ranges *r;
struct visible_range *ri;
struct grid_cell gc;
if (nx == 0)
nx = 1;
@@ -1230,14 +1320,39 @@ screen_write_clearcharacter(struct screen_write_ctx *ctx, u_int nx, u_int bg)
ctx->wp->flags |= PANE_REDRAW;
#endif
screen_write_initctx(ctx, &ttyctx, 0, 0);
screen_write_initctx(ctx, &ttyctx, 0, 1);
ttyctx.bg = bg;
grid_view_clear(s->grid, s->cx, s->cy, nx, 1, bg);
screen_write_collect_flush(ctx, 0, __func__);
ttyctx.n = nx;
if (~ttyctx.flags & TTY_CTX_PANE_OBSCURED || ctx->wp == NULL) {
tty_write(tty_cmd_clearcharacter, &ttyctx);
return;
}
xoff = ctx->wp->xoff;
yoff = ctx->wp->yoff;
sx = screen_size_x(s);
r = screen_redraw_get_visible_ranges(ctx->wp,
xoff + s->cx, yoff + s->cy, sx - s->cx, NULL);
for (i = 0; i < r->used; i++) {
ri = &r->ranges[i];
if (ri->nx == 0)
continue;
cx = ri->px - xoff;
for (n = 0; n < ri->nx && cx < sx; n++, cx++) {
grid_view_get_cell(s->grid, cx, s->cy, &gc);
screen_write_set_cursor(ctx, cx, -1);
ttyctx.cell = &gc;
tty_write(tty_cmd_cell, &ttyctx);
}
}
}
/* Insert ny lines. */
@@ -1247,9 +1362,15 @@ screen_write_insertline(struct screen_write_ctx *ctx, u_int ny, u_int bg)
struct screen *s = ctx->s;
struct grid *gd = s->grid;
struct tty_ctx ttyctx;
u_int sx, sy, xoff, yoff, y, cx, i, n;
struct visible_ranges *r;
struct visible_range *ri;
struct grid_cell gc;
#ifdef ENABLE_SIXEL
u_int sy = screen_size_y(s);
sy = screen_size_y(s);
#else
sy = screen_size_y(s);
#endif
if (ny == 0)
@@ -1273,10 +1394,37 @@ screen_write_insertline(struct screen_write_ctx *ctx, u_int ny, u_int bg)
screen_write_collect_flush(ctx, 0, __func__);
ttyctx.n = ny;
if (~ttyctx.flags & TTY_CTX_PANE_OBSCURED || ctx->wp == NULL) {
tty_write(tty_cmd_insertline, &ttyctx);
return;
}
sx = screen_size_x(s);
xoff = ctx->wp->xoff;
yoff = ctx->wp->yoff;
for (y = s->cy; y < sy; y++) {
screen_write_set_cursor(ctx, 0, y);
r = screen_redraw_get_visible_ranges(ctx->wp,
xoff, yoff + y, sx, NULL);
for (i = 0; i < r->used; i++) {
ri = &r->ranges[i];
if (ri->nx == 0)
continue;
cx = ri->px - xoff;
for (n = 0; n < ri->nx && cx < sx; n++, cx++) {
grid_view_get_cell(gd, cx, y, &gc);
screen_write_set_cursor(ctx, cx, -1);
ttyctx.cell = &gc;
tty_write(tty_cmd_cell, &ttyctx);
}
}
}
return;
}
if (ny > s->rlower + 1 - s->cy)
ny = s->rlower + 1 - s->cy;
if (ny == 0)
@@ -1293,7 +1441,34 @@ screen_write_insertline(struct screen_write_ctx *ctx, u_int ny, u_int bg)
screen_write_collect_flush(ctx, 0, __func__);
ttyctx.n = ny;
if (~ttyctx.flags & TTY_CTX_PANE_OBSCURED || ctx->wp == NULL) {
tty_write(tty_cmd_insertline, &ttyctx);
return;
}
sx = screen_size_x(s);
xoff = ctx->wp->xoff;
yoff = ctx->wp->yoff;
for (y = s->cy; y <= s->rlower; y++) {
screen_write_set_cursor(ctx, 0, y);
r = screen_redraw_get_visible_ranges(ctx->wp,
xoff, yoff + y, sx, NULL);
for (i = 0; i < r->used; i++) {
ri = &r->ranges[i];
if (ri->nx == 0)
continue;
cx = ri->px - xoff;
for (n = 0; n < ri->nx && cx < sx; n++, cx++) {
grid_view_get_cell(gd, cx, y, &gc);
screen_write_set_cursor(ctx, cx, -1);
ttyctx.cell = &gc;
tty_write(tty_cmd_cell, &ttyctx);
}
}
}
}
/* Delete ny lines. */
@@ -1303,7 +1478,12 @@ screen_write_deleteline(struct screen_write_ctx *ctx, u_int ny, u_int bg)
struct screen *s = ctx->s;
struct grid *gd = s->grid;
struct tty_ctx ttyctx;
u_int sy = screen_size_y(s);
u_int sx, sy, xoff, yoff, y, cx, i, n;
struct visible_ranges *r;
struct visible_range *ri;
struct grid_cell gc;
sy = screen_size_y(s);
if (ny == 0)
ny = 1;
@@ -1326,10 +1506,37 @@ screen_write_deleteline(struct screen_write_ctx *ctx, u_int ny, u_int bg)
screen_write_collect_flush(ctx, 0, __func__);
ttyctx.n = ny;
if (~ttyctx.flags & TTY_CTX_PANE_OBSCURED || ctx->wp == NULL) {
tty_write(tty_cmd_deleteline, &ttyctx);
return;
}
sx = screen_size_x(s);
xoff = ctx->wp->xoff;
yoff = ctx->wp->yoff;
for (y = s->cy; y < sy; y++) {
screen_write_set_cursor(ctx, 0, y);
r = screen_redraw_get_visible_ranges(ctx->wp,
xoff, yoff + y, sx, NULL);
for (i = 0; i < r->used; i++) {
ri = &r->ranges[i];
if (ri->nx == 0)
continue;
cx = ri->px - xoff;
for (n = 0; n < ri->nx && cx < sx; n++, cx++) {
grid_view_get_cell(gd, cx, y, &gc);
screen_write_set_cursor(ctx, cx, -1);
ttyctx.cell = &gc;
tty_write(tty_cmd_cell, &ttyctx);
}
}
}
return;
}
if (ny > s->rlower + 1 - s->cy)
ny = s->rlower + 1 - s->cy;
if (ny == 0)
@@ -1345,7 +1552,34 @@ screen_write_deleteline(struct screen_write_ctx *ctx, u_int ny, u_int bg)
screen_write_collect_flush(ctx, 0, __func__);
ttyctx.n = ny;
if (~ttyctx.flags & TTY_CTX_PANE_OBSCURED || ctx->wp == NULL) {
tty_write(tty_cmd_deleteline, &ttyctx);
return;
}
sx = screen_size_x(s);
xoff = ctx->wp->xoff;
yoff = ctx->wp->yoff;
for (y = s->cy; y <= s->rlower; y++) {
screen_write_set_cursor(ctx, 0, y);
r = screen_redraw_get_visible_ranges(ctx->wp,
xoff, yoff + y, sx, NULL);
for (i = 0; i < r->used; i++) {
ri = &r->ranges[i];
if (ri->nx == 0)
continue;
cx = ri->px - xoff;
for (n = 0; n < ri->nx && cx < sx; n++, cx++) {
grid_view_get_cell(gd, cx, y, &gc);
screen_write_set_cursor(ctx, cx, -1);
ttyctx.cell = &gc;
tty_write(tty_cmd_cell, &ttyctx);
}
}
}
}
/* Clear line at cursor. */
@@ -1485,6 +1719,10 @@ screen_write_reverseindex(struct screen_write_ctx *ctx, u_int bg)
{
struct screen *s = ctx->s;
struct tty_ctx ttyctx;
u_int sx, xoff, yoff, cx, i, n;
struct visible_ranges *r;
struct visible_range *ri;
struct grid_cell gc;
if (s->cy == s->rupper) {
#ifdef ENABLE_SIXEL
@@ -1498,10 +1736,33 @@ screen_write_reverseindex(struct screen_write_ctx *ctx, u_int bg)
screen_write_initctx(ctx, &ttyctx, 1, 0);
ttyctx.bg = bg;
if (~ttyctx.flags & TTY_CTX_PANE_OBSCURED || ctx->wp == NULL) {
tty_write(tty_cmd_reverseindex, &ttyctx);
return;
}
sx = screen_size_x(s);
xoff = ctx->wp->xoff;
yoff = ctx->wp->yoff;
screen_write_set_cursor(ctx, 0, s->rupper);
r = screen_redraw_get_visible_ranges(ctx->wp,
xoff, yoff + s->rupper, sx, NULL);
for (i = 0; i < r->used; i++) {
ri = &r->ranges[i];
if (ri->nx == 0)
continue;
cx = ri->px - xoff;
for (n = 0; n < ri->nx && cx < sx; n++, cx++) {
grid_view_get_cell(s->grid, cx, s->rupper, &gc);
screen_write_set_cursor(ctx, cx, -1);
ttyctx.cell = &gc;
tty_write(tty_cmd_cell, &ttyctx);
}
}
} else if (s->cy > 0)
screen_write_set_cursor(ctx, -1, s->cy - 1);
}
/* Set scroll region. */
@@ -1604,7 +1865,10 @@ screen_write_scrolldown(struct screen_write_ctx *ctx, u_int lines, u_int bg)
struct screen *s = ctx->s;
struct grid *gd = s->grid;
struct tty_ctx ttyctx;
u_int i;
u_int sx, xoff, yoff, y, cx, i, n;
struct visible_ranges *r;
struct visible_range *ri;
struct grid_cell gc;
screen_write_initctx(ctx, &ttyctx, 1, 1);
ttyctx.bg = bg;
@@ -1624,7 +1888,34 @@ screen_write_scrolldown(struct screen_write_ctx *ctx, u_int lines, u_int bg)
screen_write_collect_flush(ctx, 0, __func__);
ttyctx.n = lines;
if (~ttyctx.flags & TTY_CTX_PANE_OBSCURED || ctx->wp == NULL) {
tty_write(tty_cmd_scrolldown, &ttyctx);
return;
}
sx = screen_size_x(s);
xoff = ctx->wp->xoff;
yoff = ctx->wp->yoff;
for (y = s->rupper; y <= s->rlower; y++) {
screen_write_set_cursor(ctx, 0, y);
r = screen_redraw_get_visible_ranges(ctx->wp,
xoff, yoff + y, sx, NULL);
for (i = 0; i < r->used; i++) {
ri = &r->ranges[i];
if (ri->nx == 0)
continue;
cx = ri->px - xoff;
for (n = 0; n < ri->nx && cx < sx; n++, cx++) {
grid_view_get_cell(gd, cx, y, &gc);
screen_write_set_cursor(ctx, cx, -1);
ttyctx.cell = &gc;
tty_write(tty_cmd_cell, &ttyctx);
}
}
}
}
/* Carriage return (cursor to start of line). */
@@ -2755,9 +3046,14 @@ screen_write_sixelimage(struct screen_write_ctx *ctx, struct sixel_image *si,
}
screen_write_collect_flush(ctx, 0, __func__);
screen_write_initctx(ctx, &ttyctx, 0, 0);
screen_write_initctx(ctx, &ttyctx, 0, 1);
ttyctx.image = image_store(s, si);
if ((ttyctx.flags & TTY_CTX_PANE_OBSCURED) && ctx->wp != NULL) {
ctx->wp->flags |= PANE_REDRAW;
return;
}
tty_write(tty_cmd_sixelimage, &ttyctx);
screen_write_cursormove(ctx, 0, cy + y, 0);

2
tmux.1
View File

@@ -8343,7 +8343,7 @@ was created but is not linked to the current session.
The window with ID
.Ar window\-id ,
which is not linked to the current session, was closed.
.It Ic %unlinked\-window\-renamed Ar window\-id
.It Ic %unlinked\-window\-renamed Ar window\-id Ar new\-name
The window with ID
.Ar window\-id ,
which is not linked to the current session, was renamed.

7
tty.c
View File

@@ -1421,8 +1421,6 @@ tty_draw_pane(struct tty *tty, const struct tty_ctx *ctx, u_int py)
*/
r = tty_check_overlay_range(tty, ctx->xoff,
ctx->yoff + py, nx);
r = screen_redraw_get_visible_ranges(wp,
ctx->xoff, ctx->yoff + py, nx, r);
for (i = 0; i < r->used; i++) {
ri = &r->ranges[i];
if (ri->nx == 0) continue;
@@ -1451,12 +1449,12 @@ tty_draw_pane(struct tty *tty, const struct tty_ctx *ctx, u_int py)
}
if (tty_clamp_line(tty, ctx, 0, py, nx, &px, &x, &rx, &ry)) {
if (wp) {
r = tty_check_overlay_range(tty, i, py, rx);
r = tty_check_overlay_range(tty, px, py, rx);
for (i=0; i < r->used; i++) {
ri = &r->ranges[i];
if (ri->nx == 0)
continue;
tty_draw_line(tty, s, i, py, ri->nx,
tty_draw_line(tty, s, ri->px, py, ri->nx,
x + ri->px, ry, &ctx->defaults,
ctx->palette);
}
@@ -2094,7 +2092,6 @@ tty_cmd_cell(struct tty *tty, const struct tty_ctx *ctx)
tty_margin_off(tty);
tty_cursor_pane_unless_wrap(tty, ctx, ctx->ocx, ctx->ocy);
if (screen_redraw_is_visible(r, px))
tty_cell(tty, ctx->cell, &ctx->defaults, ctx->palette,
ctx->s->hyperlinks);

View File

@@ -347,9 +347,7 @@ window_destroy(struct window *w)
window_unzoom(w, 0);
RB_REMOVE(windows, &windows, w);
if (w->layout_root != NULL)
layout_free_cell(w->layout_root);
if (w->saved_layout_root != NULL)
layout_free_cell(w->saved_layout_root);
free(w->old_layout);