mirror of
https://github.com/tmux/tmux.git
synced 2026-06-21 17:55:21 +00:00
put the hidden panes format specifiers in the correct positions.
This commit is contained in:
34
format.c
34
format.c
@@ -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
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user