mirror of
https://github.com/tmux/tmux.git
synced 2025-12-20 00:01:17 -05:00
Bugfix fix redraw of overlapping floating panes.
This commit is contained in:
parent
e3b7bf9b31
commit
8db76e9057
@ -940,6 +940,15 @@ screen_redraw_is_visible(struct visible_ranges *ranges, u_int px)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
screen_redraw_print_panes(struct window *w) {
|
||||||
|
struct window_pane *wp;
|
||||||
|
|
||||||
|
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||||
|
printf("id=%u %ux%u @%u,%u\n", wp->id, wp->sx, wp->sy, wp->xoff, wp->yoff);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Construct ranges of line at px,py of width cells of base_wp that are
|
/* Construct ranges of line at px,py of width cells of base_wp that are
|
||||||
unobsructed. */
|
unobsructed. */
|
||||||
struct visible_ranges *
|
struct visible_ranges *
|
||||||
@ -971,6 +980,7 @@ screen_redraw_get_visible_ranges(struct window_pane *base_wp, u_int px,
|
|||||||
w = base_wp->window;
|
w = base_wp->window;
|
||||||
pane_scrollbars = options_get_number(w->options, "pane-scrollbars");
|
pane_scrollbars = options_get_number(w->options, "pane-scrollbars");
|
||||||
|
|
||||||
|
found_self = 0;
|
||||||
TAILQ_FOREACH(wp, &w->panes, entry) {
|
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||||
if (wp == base_wp) {
|
if (wp == base_wp) {
|
||||||
found_self = 1;
|
found_self = 1;
|
||||||
@ -979,7 +989,7 @@ screen_redraw_get_visible_ranges(struct window_pane *base_wp, u_int px,
|
|||||||
|
|
||||||
tb = wp->yoff-1;
|
tb = wp->yoff-1;
|
||||||
bb = wp->yoff + wp->sy;
|
bb = wp->yoff + wp->sy;
|
||||||
if (!found_self || wp->layout_cell != NULL ||
|
if (!found_self ||
|
||||||
(wp->flags & PANE_MINIMISED) ||
|
(wp->flags & PANE_MINIMISED) ||
|
||||||
(py < tb || py > bb))
|
(py < tb || py > bb))
|
||||||
continue;
|
continue;
|
||||||
@ -1007,8 +1017,8 @@ screen_redraw_get_visible_ranges(struct window_pane *base_wp, u_int px,
|
|||||||
else if (rb > vr[r].px &&
|
else if (rb > vr[r].px &&
|
||||||
rb < vr[r].px + vr[r].nx &&
|
rb < vr[r].px + vr[r].nx &&
|
||||||
lb <= vr[r].px) {
|
lb <= vr[r].px) {
|
||||||
vr[r].px = vr[r].px + (rb - vr[r].px);
|
|
||||||
vr[r].nx = vr[r].nx - (rb - vr[r].px);
|
vr[r].nx = vr[r].nx - (rb - vr[r].px);
|
||||||
|
vr[r].px = vr[r].px + (rb - vr[r].px);
|
||||||
}
|
}
|
||||||
/* Else if wp fully inside range
|
/* Else if wp fully inside range
|
||||||
then split range into 2 ranges. */
|
then split range into 2 ranges. */
|
||||||
|
|||||||
2
window.c
2
window.c
@ -745,7 +745,7 @@ window_add_pane(struct window *w, struct window_pane *other, u_int hlimit,
|
|||||||
TAILQ_INSERT_BEFORE(other, wp, entry);
|
TAILQ_INSERT_BEFORE(other, wp, entry);
|
||||||
} else {
|
} else {
|
||||||
log_debug("%s: @%u after %%%u", __func__, w->id, wp->id);
|
log_debug("%s: @%u after %%%u", __func__, w->id, wp->id);
|
||||||
if (flags & SPAWN_FULLSIZE)
|
if (flags & SPAWN_FULLSIZE|SPAWN_FLOATING)
|
||||||
TAILQ_INSERT_TAIL(&w->panes, wp, entry);
|
TAILQ_INSERT_TAIL(&w->panes, wp, entry);
|
||||||
else
|
else
|
||||||
TAILQ_INSERT_AFTER(&w->panes, other, wp, entry);
|
TAILQ_INSERT_AFTER(&w->panes, other, wp, entry);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user