Fix some int/u_int bugs and added some logging.

This commit is contained in:
Michael Grant
2026-03-17 17:05:57 +00:00
parent 6c9e2f7e6c
commit c42a939e98
3 changed files with 23 additions and 8 deletions

View File

@@ -461,16 +461,16 @@ screen_redraw_check_cell(struct screen_redraw_ctx *ctx, u_int px, u_int py,
wp->scrollbar_style.pad;
if (sb_pos == PANE_SCROLLBARS_LEFT) {
if (~wp->flags & PANE_MINIMISED &&
((int)px >= wp->xoff - 1 - sb_w &&
((int)px >= (int)wp->xoff - 1 - sb_w &&
(int)px <= wp->xoff + (int)wp->sx) &&
((int)py >= wp->yoff - 1 &&
((int)py >= (int)wp->yoff - 1 &&
(int)py <= wp->yoff + (int)wp->sy))
break;
} else { /* PANE_SCROLLBARS_RIGHT or none. */
if (~wp->flags & PANE_MINIMISED &&
((int)px >= wp->xoff - 1 &&
((int)px >= (int)wp->xoff - 1 &&
(int)px <= wp->xoff + (int)wp->sx + sb_w) &&
((int)py >= wp->yoff - 1 &&
((int)py >= (int)wp->yoff - 1 &&
(int)py <= wp->yoff + (int)wp->sy))
break;
}
@@ -1178,7 +1178,7 @@ screen_redraw_get_visible_ranges(struct window_pane *base_wp, u_int px,
continue;
}
tb = wp->yoff - 1;
tb = (wp->yoff > 0) ? wp->yoff - 1 : 0;
bb = wp->yoff + wp->sy;
if (!found_self ||
!window_pane_visible(wp) ||