diff options
author | nicm <nicm> | 2021-08-17 08:44:52 +0000 |
---|---|---|
committer | nicm <nicm> | 2021-08-17 08:44:52 +0000 |
commit | 41ababdf6c0529d4336a1daf3418ad314c373614 (patch) | |
tree | 5311864f5be4a265ef7a1d80f7ed82e4aee3515e /screen-write.c | |
parent | 1a7eb6ca9006208b8b76c6a2a5a92c66648c03da (diff) | |
download | rtmux-41ababdf6c0529d4336a1daf3418ad314c373614.tar.gz rtmux-41ababdf6c0529d4336a1daf3418ad314c373614.tar.bz2 rtmux-41ababdf6c0529d4336a1daf3418ad314c373614.zip |
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.
Diffstat (limited to 'screen-write.c')
-rw-r--r-- | screen-write.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/screen-write.c b/screen-write.c index 01f8a097..c09d09ab 100644 --- a/screen-write.c +++ b/screen-write.c @@ -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; } |