mirror of
https://github.com/tmux/tmux.git
synced 2026-05-30 14:16:18 +00:00
Redraw correctly when a popup is present above pane borders, GitHub
issue 4997 from Manuel Einfalt.
This commit is contained in:
@@ -949,8 +949,8 @@ screen_redraw_draw_pane(struct screen_redraw_ctx *ctx, struct window_pane *wp)
|
||||
struct colour_palette *palette = &wp->palette;
|
||||
struct grid_cell defaults;
|
||||
struct visible_ranges *r;
|
||||
struct visible_range *rr;
|
||||
u_int i, j, k, top, x, y, width;
|
||||
struct visible_range *rr = NULL;
|
||||
u_int i, j, k, top, x, y, width, used;
|
||||
|
||||
if (wp->base.mode & MODE_SYNC)
|
||||
screen_write_stop_sync(wp);
|
||||
@@ -997,14 +997,19 @@ screen_redraw_draw_pane(struct screen_redraw_ctx *ctx, struct window_pane *wp)
|
||||
tty_default_colours(&defaults, wp);
|
||||
|
||||
r = tty_check_overlay_range(tty, x, y, width);
|
||||
for (k = 0; k < r->used; k++) {
|
||||
rr = &r->ranges[k];
|
||||
if (rr->nx != 0) {
|
||||
tty_draw_line(tty, s, rr->px - wp->xoff, j,
|
||||
rr->nx, rr->px, y, &defaults, palette);
|
||||
used = r->used;
|
||||
|
||||
rr = xreallocarray(rr, used, sizeof *rr);
|
||||
memcpy(rr, r->ranges, used * sizeof *rr);
|
||||
|
||||
for (k = 0; k < used; k++) {
|
||||
if (rr[k].nx != 0) {
|
||||
tty_draw_line(tty, s, rr[k].px - wp->xoff, j,
|
||||
rr[k].nx, rr[k].px, y, &defaults, palette);
|
||||
}
|
||||
}
|
||||
}
|
||||
free(rr);
|
||||
}
|
||||
|
||||
/* Draw the panes scrollbars */
|
||||
|
||||
Reference in New Issue
Block a user