mirror of
https://github.com/tmux/tmux.git
synced 2026-06-20 17:25:57 +00:00
Fix cursor and redraw overlap with auto-hide scrollbars
Auto-hide scrollbars are drawn as overlays inside the pane rather than in reserved columns. Avoid optimized pane scrolling/redraw paths writing through a visible overlay scrollbar, and suppress the terminal cursor when it would be placed in the visible overlay scrollbar column. This prevents transient wrong-colour cells and cursor blocks appearing over the scrollbar, especially when scrolling small floating panes. This fixed the green block issue.
This commit is contained in:
@@ -2174,6 +2174,10 @@ screen_write_collect_flush_scrolled(struct screen_write_ctx *ctx)
|
||||
screen_write_redraw_pane(ctx, &ttyctx);
|
||||
return 0;
|
||||
}
|
||||
if (wp != NULL && window_pane_scrollbar_overlay_visible(wp)) {
|
||||
wp->flags |= PANE_REDRAW;
|
||||
return 0;
|
||||
}
|
||||
|
||||
log_debug("%s: scrolled %u (region %u-%u)", __func__, ctx->scrolled,
|
||||
s->rupper, s->rlower);
|
||||
@@ -2187,7 +2191,7 @@ screen_write_collect_flush_scrolled(struct screen_write_ctx *ctx)
|
||||
tty_write(tty_cmd_scrollup, &ttyctx);
|
||||
|
||||
if (wp != NULL)
|
||||
wp->flags |= PANE_REDRAWSCROLLBAR;
|
||||
window_pane_scrollbar_redraw(wp);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user