mirror of
https://github.com/tmux/tmux.git
synced 2026-06-20 17:25:57 +00:00
Fix missing border when drawing floating panes. From Michael Grant.
This commit is contained in:
@@ -127,7 +127,7 @@ screen_redraw_pane_border(struct screen_redraw_ctx *ctx, struct window_pane *wp,
|
||||
int ex = wp->xoff + wp->sx, ey = wp->yoff + wp->sy;
|
||||
int hsplit = 0, vsplit = 0, pane_status = ctx->pane_status;
|
||||
int pane_scrollbars = ctx->pane_scrollbars, sb_w = 0;
|
||||
int sb_pos, sx = wp->sx, sy = wp->sy;
|
||||
int sb_pos, sx = wp->sx, sy = wp->sy, left, right;
|
||||
enum layout_type split_type;
|
||||
|
||||
if (pane_scrollbars != 0)
|
||||
@@ -145,20 +145,19 @@ screen_redraw_pane_border(struct screen_redraw_ctx *ctx, struct window_pane *wp,
|
||||
|
||||
/* Floating pane borders. */
|
||||
if (window_pane_is_floating(wp)) {
|
||||
left = wp->xoff - 1;
|
||||
right = wp->xoff + sx;
|
||||
if (sb_pos == PANE_SCROLLBARS_LEFT)
|
||||
left -= sb_w;
|
||||
else
|
||||
right += sb_w;
|
||||
if (py >= wp->yoff - 1 && py <= wp->yoff + sy) {
|
||||
if (sb_pos == PANE_SCROLLBARS_LEFT) {
|
||||
if (px == wp->xoff - 1 - sb_w)
|
||||
return (SCREEN_REDRAW_BORDER_LEFT);
|
||||
if (px == wp->xoff + sx)
|
||||
return (SCREEN_REDRAW_BORDER_RIGHT);
|
||||
} else { /* PANE_SCROLLBARS_RIGHT or none. */
|
||||
if (px == wp->xoff - 1)
|
||||
return (SCREEN_REDRAW_BORDER_LEFT);
|
||||
if (px == wp->xoff + sx + sb_w)
|
||||
return (SCREEN_REDRAW_BORDER_RIGHT);
|
||||
}
|
||||
if (px == left)
|
||||
return (SCREEN_REDRAW_BORDER_LEFT);
|
||||
if (px == right)
|
||||
return (SCREEN_REDRAW_BORDER_RIGHT);
|
||||
}
|
||||
if (px >= wp->xoff && px <= wp->xoff + sx) {
|
||||
if (px > left && px <= right) {
|
||||
if (py == wp->yoff - 1)
|
||||
return (SCREEN_REDRAW_BORDER_TOP);
|
||||
if (py == wp->yoff + sy)
|
||||
|
||||
Reference in New Issue
Block a user