Add pane-border-lines none like popups (-B to new-pane).

This commit is contained in:
nicm
2026-06-15 17:34:25 +00:00
parent bb750b07bc
commit b86bd1fcd0
8 changed files with 79 additions and 29 deletions

View File

@@ -602,6 +602,7 @@ server_client_exec(struct client *c, const char *cmd)
free(msg);
}
/* Is the mouse inside a pane? */
static enum key_code_mouse_location
server_client_check_mouse_in_pane(struct window_pane *wp, int px, int py,
u_int *sl_mpos)
@@ -659,6 +660,7 @@ server_client_check_mouse_in_pane(struct window_pane *wp, int px, int py,
} else /* py > sl_bottom */
return (KEYC_MOUSE_LOCATION_SCROLLBAR_DOWN);
} else if (window_pane_is_floating(wp) &&
window_pane_get_pane_lines(wp) != PANE_LINES_NONE &&
(px == wp->xoff - 1 ||
py == wp->yoff - 1 ||
py == wp->yoff + (int)wp->sy)) {
@@ -674,6 +676,9 @@ server_client_check_mouse_in_pane(struct window_pane *wp, int px, int py,
if ((w->flags & WINDOW_ZOOMED) &&
(~fwp->flags & PANE_ZOOMED))
continue;
if (window_pane_is_floating(fwp) &&
window_pane_get_pane_lines(fwp) == PANE_LINES_NONE)
continue;
bdr_top = fwp->yoff - 1;
bdr_bottom = fwp->yoff + fwp->sy;
if (sb_pos == PANE_SCROLLBARS_LEFT)
@@ -1510,12 +1515,14 @@ server_client_handle_key0(struct client *c, struct key_event *event,
return (1);
}
/* Handle key and insert at end of queue. */
int
server_client_handle_key(struct client *c, struct key_event *event)
{
return (server_client_handle_key0(c, event, NULL, NULL));
}
/* Handle key and insert after another item. */
int
server_client_handle_key_after(struct client *c, struct key_event *event,
struct cmdq_item *after, struct cmdq_item **next)