mirror of
https://github.com/tmux/tmux.git
synced 2026-10-13 06:04:34 +00:00
Clip floating panes exactly at window edge, don't let the border creep
into the first outside column.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: screen-redraw.c,v 1.154 2026/07/21 11:53:41 nicm Exp $ */
|
/* $OpenBSD: screen-redraw.c,v 1.155 2026/07/21 13:27:41 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2026 Nicholas Marriott <nicholas.marriott@gmail.com>
|
* Copyright (c) 2026 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||||
@@ -696,20 +696,22 @@ redraw_mark_pane_borders(struct redraw_build_ctx *bctx, struct window_pane *wp,
|
|||||||
bottom = wp->yoff + wp->sy;
|
bottom = wp->yoff + wp->sy;
|
||||||
|
|
||||||
mark_left = (left >= 0);
|
mark_left = (left >= 0);
|
||||||
mark_right = (right <= (int)bctx->w->sx);
|
|
||||||
mark_top = (top >= 0);
|
mark_top = (top >= 0);
|
||||||
mark_bottom = (bottom <= (int)bctx->w->sy);
|
|
||||||
|
|
||||||
if (floating) {
|
if (floating) {
|
||||||
|
mark_right = (right < (int)bctx->w->sx);
|
||||||
|
mark_bottom = (bottom < (int)bctx->w->sy);
|
||||||
if (left < 0)
|
if (left < 0)
|
||||||
left = 0;
|
left = 0;
|
||||||
if (right > (int)bctx->w->sx)
|
if (right >= (int)bctx->w->sx)
|
||||||
right = (int)bctx->w->sx - 1;
|
right = (int)bctx->w->sx - 1;
|
||||||
if (top < 0)
|
if (top < 0)
|
||||||
top = 0;
|
top = 0;
|
||||||
if (bottom > (int)bctx->w->sy)
|
if (bottom >= (int)bctx->w->sy)
|
||||||
bottom = (int)bctx->w->sy - 1;
|
bottom = (int)bctx->w->sy - 1;
|
||||||
} else {
|
} else {
|
||||||
|
mark_right = (right <= (int)bctx->w->sx);
|
||||||
|
mark_bottom = (bottom <= (int)bctx->w->sy);
|
||||||
if (pane_status == PANE_STATUS_TOP)
|
if (pane_status == PANE_STATUS_TOP)
|
||||||
mark_bottom = 0;
|
mark_bottom = 0;
|
||||||
else if (pane_status == PANE_STATUS_BOTTOM)
|
else if (pane_status == PANE_STATUS_BOTTOM)
|
||||||
|
|||||||
Reference in New Issue
Block a user