Merge pull request #5197 from daneofmanythings/fp--hidden-pane-flag-location

fix(floating_panes): Move the hidden panes format logic to their alphabetical positions.
This commit is contained in:
Dane Jensen
2026-06-11 14:52:31 -07:00
committed by GitHub

View File

@@ -2145,6 +2145,20 @@ format_cb_pane_height(struct format_tree *ft)
return (NULL);
}
/* Callback for pane_hidden_flag. */
static void *
format_cb_pane_hidden_flag(struct format_tree *ft)
{
struct window_pane *wp = ft->wp;
if (wp != NULL) {
if (wp->flags & PANE_HIDDEN)
return (xstrdup("1"));
return (xstrdup("0"));
}
return (NULL);
}
/* Callback for pane_id. */
static void *
format_cb_pane_id(struct format_tree *ft)
@@ -2251,20 +2265,6 @@ format_cb_pane_marked_set(struct format_tree *ft)
return (NULL);
}
/* Callback for pane_hidden_flag. */
static void *
format_cb_pane_hidden_flag(struct format_tree *ft)
{
struct window_pane *wp = ft->wp;
if (wp != NULL) {
if (wp->flags & PANE_HIDDEN)
return (xstrdup("1"));
return (xstrdup("0"));
}
return (NULL);
}
/* Callback for pane_mode. */
static void *
format_cb_pane_mode(struct format_tree *ft)
@@ -3464,6 +3464,9 @@ static const struct format_table_entry format_table[] = {
{ "pane_height", FORMAT_TABLE_STRING,
format_cb_pane_height
},
{ "pane_hidden_flag", FORMAT_TABLE_STRING,
format_cb_pane_hidden_flag
},
{ "pane_id", FORMAT_TABLE_STRING,
format_cb_pane_id
},
@@ -3491,9 +3494,6 @@ static const struct format_table_entry format_table[] = {
{ "pane_marked_set", FORMAT_TABLE_STRING,
format_cb_pane_marked_set
},
{ "pane_hidden_flag", FORMAT_TABLE_STRING,
format_cb_pane_hidden_flag
},
{ "pane_mode", FORMAT_TABLE_STRING,
format_cb_pane_mode
},