mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
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:
@ -197,9 +197,20 @@ screen_write_initctx(struct screen_write_ctx *ctx, struct tty_ctx *ttyctx,
|
||||
}
|
||||
}
|
||||
|
||||
if (ctx->wp != NULL &&
|
||||
(~ctx->flags & SCREEN_WRITE_SYNC) &&
|
||||
(sync || ctx->wp != ctx->wp->window->active)) {
|
||||
if (~ctx->flags & SCREEN_WRITE_SYNC) {
|
||||
/*
|
||||
* For the active pane or for an overlay (no pane), we want to
|
||||
* only use synchronized updates if requested (commands that
|
||||
* move the cursor); for other panes, always use it, since the
|
||||
* cursor will have to move.
|
||||
*/
|
||||
if (ctx->wp != NULL) {
|
||||
if (ctx->wp != ctx->wp->window->active)
|
||||
ttyctx->num = 1;
|
||||
else
|
||||
ttyctx->num = sync;
|
||||
} else
|
||||
ttyctx->num = 0x10|sync;
|
||||
tty_write(tty_cmd_syncstart, ttyctx);
|
||||
ctx->flags |= SCREEN_WRITE_SYNC;
|
||||
}
|
||||
|
Reference in New Issue
Block a user