mirror of
https://github.com/tmux/tmux.git
synced 2025-01-08 08:58:47 +00:00
Merge branch 'obsd-master'
This commit is contained in:
commit
5d3296c53b
2
grid.c
2
grid.c
@ -553,6 +553,8 @@ grid_move_cells(struct grid *gd, u_int dx, u_int px, u_int py, u_int nx,
|
|||||||
grid_expand_line(gd, py, dx + nx, 8);
|
grid_expand_line(gd, py, dx + nx, 8);
|
||||||
memmove(&gl->celldata[dx], &gl->celldata[px],
|
memmove(&gl->celldata[dx], &gl->celldata[px],
|
||||||
nx * sizeof *gl->celldata);
|
nx * sizeof *gl->celldata);
|
||||||
|
if (dx + nx > gl->cellused)
|
||||||
|
gl->cellused = dx + nx;
|
||||||
|
|
||||||
/* Wipe any cells that have been moved. */
|
/* Wipe any cells that have been moved. */
|
||||||
for (xx = px; xx < px + nx; xx++) {
|
for (xx = px; xx < px + nx; xx++) {
|
||||||
|
@ -1030,8 +1030,9 @@ screen_write_collect_flush(struct screen_write_ctx *ctx, int scroll_only)
|
|||||||
{
|
{
|
||||||
struct screen *s = ctx->s;
|
struct screen *s = ctx->s;
|
||||||
struct screen_write_collect_item *ci, *tmp;
|
struct screen_write_collect_item *ci, *tmp;
|
||||||
u_int y, cx, cy;
|
u_int y, cx, cy, items = 0;
|
||||||
struct tty_ctx ttyctx;
|
struct tty_ctx ttyctx;
|
||||||
|
size_t written = 0;
|
||||||
|
|
||||||
if (ctx->scrolled != 0) {
|
if (ctx->scrolled != 0) {
|
||||||
log_debug("%s: scrolled %u (region %u-%u)", __func__,
|
log_debug("%s: scrolled %u (region %u-%u)", __func__,
|
||||||
@ -1056,13 +1057,18 @@ screen_write_collect_flush(struct screen_write_ctx *ctx, int scroll_only)
|
|||||||
ttyctx.ptr = ci->data;
|
ttyctx.ptr = ci->data;
|
||||||
ttyctx.num = ci->used;
|
ttyctx.num = ci->used;
|
||||||
tty_write(tty_cmd_cells, &ttyctx);
|
tty_write(tty_cmd_cells, &ttyctx);
|
||||||
ctx->written += ci->used;
|
|
||||||
|
items++;
|
||||||
|
written += ci->used;
|
||||||
|
|
||||||
TAILQ_REMOVE(&ctx->list[y].items, ci, entry);
|
TAILQ_REMOVE(&ctx->list[y].items, ci, entry);
|
||||||
free(ci);
|
free(ci);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
s->cx = cx; s->cy = cy;
|
s->cx = cx; s->cy = cy;
|
||||||
|
|
||||||
|
log_debug("%s: flushed %u items (%zu bytes)", __func__, items, written);
|
||||||
|
ctx->written += written;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Finish and store collected cells. */
|
/* Finish and store collected cells. */
|
||||||
@ -1101,9 +1107,9 @@ screen_write_collect_add(struct screen_write_ctx *ctx,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Don't need to check that the attributes and whatnot are still the
|
* Don't need to check that the attributes and whatnot are still the
|
||||||
* same - input_parse will do a flush when anything that isn't a plain
|
* same - input_parse will end the collection when anything that isn't
|
||||||
* character is encountered. Also nothing should make it here that
|
* a plain character is encountered. Also nothing should make it here
|
||||||
* isn't a single ASCII character.
|
* that isn't a single ASCII character.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
collect = 1;
|
collect = 1;
|
||||||
@ -1119,6 +1125,7 @@ screen_write_collect_add(struct screen_write_ctx *ctx,
|
|||||||
collect = 0;
|
collect = 0;
|
||||||
if (!collect) {
|
if (!collect) {
|
||||||
screen_write_collect_end(ctx);
|
screen_write_collect_end(ctx);
|
||||||
|
screen_write_collect_flush(ctx, 0);
|
||||||
screen_write_cell(ctx, gc);
|
screen_write_cell(ctx, gc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user