1
0
mirror of https://github.com/openbsd/src.git synced 2026-06-18 15:23:33 +02:00

Redraw correctly when a popup is present above pane borders, GitHub

issue 4997 from Manuel Einfalt.
This commit is contained in:
nicm
2026-04-23 11:29:23 +00:00
parent 2b3041c8ed
commit 69613764e0
+13 -8
View File
@@ -1,4 +1,4 @@
/* $OpenBSD: screen-redraw.c,v 1.113 2026/04/03 10:13:20 nicm Exp $ */
/* $OpenBSD: screen-redraw.c,v 1.114 2026/04/23 11:29:23 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -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 */