mirror of
https://github.com/tmux/tmux.git
synced 2026-10-15 16:04:34 +00:00
Preseve prompt flags across line clear, from Aung Myo Kyaw.
This commit is contained in:
@@ -1494,12 +1494,16 @@ screen_write_clearline(struct screen_write_ctx *ctx, u_int bg)
|
|||||||
struct grid_line *gl;
|
struct grid_line *gl;
|
||||||
u_int sx = screen_size_x(s);
|
u_int sx = screen_size_x(s);
|
||||||
struct screen_write_citem *ci = ctx->item;
|
struct screen_write_citem *ci = ctx->item;
|
||||||
|
u_int flags;
|
||||||
|
|
||||||
gl = grid_get_line(s->grid, s->grid->hsize + s->cy);
|
gl = grid_get_line(s->grid, s->grid->hsize + s->cy);
|
||||||
if (gl->cellsize == 0 && COLOUR_DEFAULT(bg))
|
if (gl->cellsize == 0 && COLOUR_DEFAULT(bg))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
flags = gl->flags & (GRID_LINE_START_PROMPT|GRID_LINE_START_OUTPUT);
|
||||||
grid_view_clear(s->grid, 0, s->cy, sx, 1, bg);
|
grid_view_clear(s->grid, 0, s->cy, sx, 1, bg);
|
||||||
|
gl = grid_get_line(s->grid, s->grid->hsize + s->cy);
|
||||||
|
gl->flags |= flags;
|
||||||
|
|
||||||
screen_write_collect_clear(ctx, s->cy, 1);
|
screen_write_collect_clear(ctx, s->cy, 1);
|
||||||
ci->x = 0;
|
ci->x = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user