mirror of
https://github.com/tmux/tmux.git
synced 2025-09-03 06:17:04 +00:00
Try to show a better preview of sessions and windows in tree mode.
This commit is contained in:
@ -387,9 +387,9 @@ screen_write_copy(struct screen_write_ctx *ctx, struct screen *src, u_int px,
|
||||
}
|
||||
}
|
||||
|
||||
/* Draw a line on screen. */
|
||||
/* Draw a horizontal line on screen. */
|
||||
void
|
||||
screen_write_line(struct screen_write_ctx *ctx, u_int nx, int left, int right)
|
||||
screen_write_hline(struct screen_write_ctx *ctx, u_int nx, int left, int right)
|
||||
{
|
||||
struct screen *s = ctx->s;
|
||||
struct grid_cell gc;
|
||||
@ -409,6 +409,31 @@ screen_write_line(struct screen_write_ctx *ctx, u_int nx, int left, int right)
|
||||
screen_write_cursormove(ctx, cx, cy);
|
||||
}
|
||||
|
||||
/* Draw a horizontal line on screen. */
|
||||
void
|
||||
screen_write_vline(struct screen_write_ctx *ctx, u_int ny, int top, int bottom)
|
||||
{
|
||||
struct screen *s = ctx->s;
|
||||
struct grid_cell gc;
|
||||
u_int cx, cy, i;
|
||||
|
||||
cx = s->cx;
|
||||
cy = s->cy;
|
||||
|
||||
memcpy(&gc, &grid_default_cell, sizeof gc);
|
||||
gc.attr |= GRID_ATTR_CHARSET;
|
||||
|
||||
screen_write_putc(ctx, &gc, top ? 'w' : 'x');
|
||||
for (i = 1; i < ny - 1; i++) {
|
||||
screen_write_cursormove(ctx, cx, cy + i);
|
||||
screen_write_putc(ctx, &gc, 'x');
|
||||
}
|
||||
screen_write_cursormove(ctx, cx, cy + ny);
|
||||
screen_write_putc(ctx, &gc, bottom ? 'v' : 'x');
|
||||
|
||||
screen_write_cursormove(ctx, cx, cy);
|
||||
}
|
||||
|
||||
/* Draw a box on screen. */
|
||||
void
|
||||
screen_write_box(struct screen_write_ctx *ctx, u_int nx, u_int ny)
|
||||
|
Reference in New Issue
Block a user