Add window-pane-status-format options and adjust the default second

status line to show panes, also change how window-style is checked now
it is a pane option.
This commit is contained in:
nicm
2026-05-27 18:57:10 +00:00
parent 84d016ddcf
commit ee67452772
4 changed files with 68 additions and 42 deletions

View File

@@ -603,9 +603,7 @@ screen_redraw_make_pane_status(struct client *c, struct window_pane *wp,
border_option = "pane-active-border-style";
else
border_option = "pane-border-style";
style_apply(&gc, w->options, border_option, ft);
if (options_get_only(wp->options, border_option) != NULL)
style_add(&gc, wp->options, border_option, ft);
style_apply(&gc, wp->options, border_option, ft);
fmt = options_get_string(wp->options, "pane-border-format");
expanded = format_expand_time(ft, fmt);
@@ -872,7 +870,6 @@ screen_redraw_draw_borders_style(struct screen_redraw_ctx *ctx, u_int x,
{
struct client *c = ctx->c;
struct session *s = c->session;
struct window *w = s->curw->window;
struct window_pane *active = server_client_get_pane(c);
struct grid_cell *gc;
const char *border_option;
@@ -891,11 +888,7 @@ screen_redraw_draw_borders_style(struct screen_redraw_ctx *ctx, u_int x,
if (!*flag) {
ft = format_create_defaults(NULL, c, s, s->curw, wp);
style_apply(gc, w->options, border_option, ft);
if (options_get_only(wp->options, border_option) != NULL)
style_add(gc, wp->options, border_option, ft);
style_apply(gc, wp->options, border_option, ft);
format_free(ft);
*flag = 1;
}
@@ -1152,6 +1145,10 @@ screen_redraw_get_visible_ranges(struct window_pane *base_wp, u_int px,
return (&sr);
}
w = base_wp->window;
if (px + width > w->sx)
width = w->sx - px;
if (r == NULL) {
/* Start with the entire width of the range. */
server_client_ensure_ranges(&base_wp->r, 1);
@@ -1161,7 +1158,6 @@ screen_redraw_get_visible_ranges(struct window_pane *base_wp, u_int px,
r->used = 1;
}
w = base_wp->window;
sb = options_get_number(w->options, "pane-scrollbars");
sb_pos = options_get_number(w->options, "pane-scrollbars-position");