Bring some new formats from the floating panes work: pane_zoomed_flag,

pane_flags, pane_floating_flag. By Michael Grant.
This commit is contained in:
nicm
2026-04-04 16:40:27 +00:00
parent d2d86ac360
commit 87aaff5fae
6 changed files with 77 additions and 9 deletions

View File

@@ -882,9 +882,8 @@ window_printable_flags(struct winlink *wl, int escape)
{
struct session *s = wl->session;
static char flags[32];
int pos;
u_int pos = 0;
pos = 0;
if (wl->flags & WINLINK_ACTIVITY) {
flags[pos++] = '#';
if (escape)
@@ -906,6 +905,25 @@ window_printable_flags(struct winlink *wl, int escape)
return (flags);
}
const char *
window_pane_printable_flags(struct window_pane *wp)
{
struct window *w = wp->window;
static char flags[32];
u_int pos = 0;
if (wp == w->active)
flags[pos++] = '*';
if (wp == TAILQ_FIRST(&w->last_panes))
flags[pos++] = '-';
if (wp->flags & PANE_ZOOMED)
flags[pos++] = 'Z';
if (wp->flags & PANE_FLOATING)
flags[pos++] = 'F';
flags[pos] = '\0';
return (flags);
}
struct window_pane *
window_pane_find_by_id_str(const char *s)
{