mirror of https://github.com/tmux/tmux.git
Merge branch 'obsd-master' into master
commit
66da51b631
1
grid.c
1
grid.c
|
@ -701,7 +701,6 @@ grid_move_lines(struct grid *gd, u_int dy, u_int py, u_int ny, u_int bg)
|
||||||
gd->linedata[py - 1].flags &= ~GRID_LINE_WRAPPED;
|
gd->linedata[py - 1].flags &= ~GRID_LINE_WRAPPED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Move a group of cells. */
|
/* Move a group of cells. */
|
||||||
void
|
void
|
||||||
grid_move_cells(struct grid *gd, u_int dx, u_int px, u_int py, u_int nx,
|
grid_move_cells(struct grid *gd, u_int dx, u_int px, u_int py, u_int nx,
|
||||||
|
|
|
@ -1516,6 +1516,7 @@ screen_write_collect_flush(struct screen_write_ctx *ctx, int scroll_only,
|
||||||
struct screen_write_collect_item *ci, *tmp;
|
struct screen_write_collect_item *ci, *tmp;
|
||||||
struct screen_write_collect_line *cl;
|
struct screen_write_collect_line *cl;
|
||||||
u_int y, cx, cy, items = 0;
|
u_int y, cx, cy, items = 0;
|
||||||
|
int clear = 0;
|
||||||
struct tty_ctx ttyctx;
|
struct tty_ctx ttyctx;
|
||||||
size_t written = 0;
|
size_t written = 0;
|
||||||
|
|
||||||
|
@ -1539,22 +1540,29 @@ screen_write_collect_flush(struct screen_write_ctx *ctx, int scroll_only,
|
||||||
cx = s->cx; cy = s->cy;
|
cx = s->cx; cy = s->cy;
|
||||||
for (y = 0; y < screen_size_y(s); y++) {
|
for (y = 0; y < screen_size_y(s); y++) {
|
||||||
cl = &ctx->s->write_list[y];
|
cl = &ctx->s->write_list[y];
|
||||||
if (cl->bg != 0) {
|
|
||||||
screen_write_set_cursor(ctx, 0, y);
|
|
||||||
screen_write_initctx(ctx, &ttyctx, 1);
|
|
||||||
ttyctx.bg = cl->bg - 1;
|
|
||||||
tty_write(tty_cmd_clearline, &ttyctx);
|
|
||||||
}
|
|
||||||
TAILQ_FOREACH_SAFE(ci, &cl->items, entry, tmp) {
|
TAILQ_FOREACH_SAFE(ci, &cl->items, entry, tmp) {
|
||||||
|
if (clear != -1 &&
|
||||||
|
(u_int)clear != ci->x &&
|
||||||
|
cl->bg != 0) {
|
||||||
|
screen_write_set_cursor(ctx, clear, y);
|
||||||
|
screen_write_initctx(ctx, &ttyctx, 1);
|
||||||
|
ttyctx.bg = cl->bg - 1;
|
||||||
|
ttyctx.num = ci->x - clear;
|
||||||
|
log_debug("clear %u at %u", ttyctx.num, clear);
|
||||||
|
tty_write(tty_cmd_clearcharacter, &ttyctx);
|
||||||
|
}
|
||||||
|
|
||||||
screen_write_set_cursor(ctx, ci->x, y);
|
screen_write_set_cursor(ctx, ci->x, y);
|
||||||
if (ci->type == CLEAR_END) {
|
if (ci->type == CLEAR_END) {
|
||||||
screen_write_initctx(ctx, &ttyctx, 1);
|
screen_write_initctx(ctx, &ttyctx, 1);
|
||||||
ttyctx.bg = ci->bg;
|
ttyctx.bg = ci->bg;
|
||||||
tty_write(tty_cmd_clearendofline, &ttyctx);
|
tty_write(tty_cmd_clearendofline, &ttyctx);
|
||||||
|
clear = -1;
|
||||||
} else if (ci->type == CLEAR_START) {
|
} else if (ci->type == CLEAR_START) {
|
||||||
screen_write_initctx(ctx, &ttyctx, 1);
|
screen_write_initctx(ctx, &ttyctx, 1);
|
||||||
ttyctx.bg = ci->bg;
|
ttyctx.bg = ci->bg;
|
||||||
tty_write(tty_cmd_clearstartofline, &ttyctx);
|
tty_write(tty_cmd_clearstartofline, &ttyctx);
|
||||||
|
clear = ci->x + 1;
|
||||||
} else {
|
} else {
|
||||||
screen_write_initctx(ctx, &ttyctx, 0);
|
screen_write_initctx(ctx, &ttyctx, 0);
|
||||||
ttyctx.cell = &ci->gc;
|
ttyctx.cell = &ci->gc;
|
||||||
|
@ -1562,6 +1570,7 @@ screen_write_collect_flush(struct screen_write_ctx *ctx, int scroll_only,
|
||||||
ttyctx.ptr = cl->data + ci->x;
|
ttyctx.ptr = cl->data + ci->x;
|
||||||
ttyctx.num = ci->used;
|
ttyctx.num = ci->used;
|
||||||
tty_write(tty_cmd_cells, &ttyctx);
|
tty_write(tty_cmd_cells, &ttyctx);
|
||||||
|
clear = ci->x + ci->used;
|
||||||
}
|
}
|
||||||
|
|
||||||
items++;
|
items++;
|
||||||
|
@ -1570,6 +1579,16 @@ screen_write_collect_flush(struct screen_write_ctx *ctx, int scroll_only,
|
||||||
TAILQ_REMOVE(&cl->items, ci, entry);
|
TAILQ_REMOVE(&cl->items, ci, entry);
|
||||||
free(ci);
|
free(ci);
|
||||||
}
|
}
|
||||||
|
if (clear != -1 &&
|
||||||
|
(u_int)clear != screen_size_x(s) - 1 &&
|
||||||
|
cl->bg != 0) {
|
||||||
|
screen_write_set_cursor(ctx, clear, y);
|
||||||
|
screen_write_initctx(ctx, &ttyctx, 1);
|
||||||
|
ttyctx.bg = cl->bg - 1;
|
||||||
|
log_debug("clear to end at %u", clear);
|
||||||
|
tty_write(tty_cmd_clearendofline, &ttyctx);
|
||||||
|
}
|
||||||
|
clear = 0;
|
||||||
cl->bg = 0;
|
cl->bg = 0;
|
||||||
}
|
}
|
||||||
s->cx = cx; s->cy = cy;
|
s->cx = cx; s->cy = cy;
|
||||||
|
|
1
tmux.h
1
tmux.h
|
@ -1891,7 +1891,6 @@ const char *find_home(void);
|
||||||
const char *getversion(void);
|
const char *getversion(void);
|
||||||
void expand_paths(const char *, char ***, u_int *);
|
void expand_paths(const char *, char ***, u_int *);
|
||||||
|
|
||||||
|
|
||||||
/* proc.c */
|
/* proc.c */
|
||||||
struct imsg;
|
struct imsg;
|
||||||
int proc_send(struct tmuxpeer *, enum msgtype, int, const void *, size_t);
|
int proc_send(struct tmuxpeer *, enum msgtype, int, const void *, size_t);
|
||||||
|
|
13
tty.c
13
tty.c
|
@ -1531,20 +1531,9 @@ tty_cmd_deletecharacter(struct tty *tty, const struct tty_ctx *ctx)
|
||||||
void
|
void
|
||||||
tty_cmd_clearcharacter(struct tty *tty, const struct tty_ctx *ctx)
|
tty_cmd_clearcharacter(struct tty *tty, const struct tty_ctx *ctx)
|
||||||
{
|
{
|
||||||
if (ctx->bigger) {
|
|
||||||
tty_draw_pane(tty, ctx, ctx->ocy);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
tty_default_attributes(tty, &ctx->defaults, ctx->palette, ctx->bg);
|
tty_default_attributes(tty, &ctx->defaults, ctx->palette, ctx->bg);
|
||||||
|
|
||||||
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy);
|
tty_clear_pane_line(tty, ctx, ctx->ocy, ctx->ocx, ctx->num, ctx->bg);
|
||||||
|
|
||||||
if (tty_term_has(tty->term, TTYC_ECH) &&
|
|
||||||
!tty_fake_bce(tty, &ctx->defaults, 8))
|
|
||||||
tty_putcode1(tty, TTYC_ECH, ctx->num);
|
|
||||||
else
|
|
||||||
tty_repeat_space(tty, ctx->num);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue