Be more sophisticated about enabling synchronized updates when there is

an overlay and treat it like the active pane (use for commands which
move the cursor only). When there is an overlay also use it for all
panes and not just the active pane. GitHub issue 2826.
This commit is contained in:
nicm
2021-08-17 08:44:52 +00:00
parent 1a7eb6ca90
commit 41ababdf6c
2 changed files with 29 additions and 5 deletions

17
tty.c
View File

@ -2039,9 +2039,22 @@ tty_cmd_rawstring(struct tty *tty, const struct tty_ctx *ctx)
}
void
tty_cmd_syncstart(struct tty *tty, __unused const struct tty_ctx *ctx)
tty_cmd_syncstart(struct tty *tty, const struct tty_ctx *ctx)
{
tty_sync_start(tty);
if (ctx->num == 0x11) {
/*
* This is an overlay and a command that moves, the cursor so
* start synchronized updates.
*/
tty_sync_start(tty);
} else if (~ctx->num & 0x10) {
/*
* This is a pane. If there is an overlay, always start;
* otherwise, only if requested.
*/
if (ctx->num || tty->client->overlay_draw != NULL)
tty_sync_start(tty);
}
}
void