mirror of
https://github.com/tmux/tmux.git
synced 2024-12-04 19:58:48 +00:00
Always format real layout even when zoomed.
This commit is contained in:
parent
93b2871cab
commit
69f292a90e
5
format.c
5
format.c
@ -577,7 +577,10 @@ format_defaults_window(struct format_tree *ft, struct window *w)
|
||||
|
||||
ft->w = w;
|
||||
|
||||
layout = layout_dump(w);
|
||||
if (w->saved_layout_root != NULL)
|
||||
layout = layout_dump(w->saved_layout_root);
|
||||
else
|
||||
layout = layout_dump(w->layout_root);
|
||||
|
||||
format_add(ft, "window_id", "@%u", w->id);
|
||||
format_add(ft, "window_name", "%s", w->name);
|
||||
|
@ -55,12 +55,12 @@ layout_checksum(const char *layout)
|
||||
|
||||
/* Dump layout as a string. */
|
||||
char *
|
||||
layout_dump(struct window *w)
|
||||
layout_dump(struct layout_cell *root)
|
||||
{
|
||||
char layout[BUFSIZ], *out;
|
||||
|
||||
*layout = '\0';
|
||||
if (layout_append(w->layout_root, layout, sizeof layout) != 0)
|
||||
if (layout_append(root, layout, sizeof layout) != 0)
|
||||
return (NULL);
|
||||
|
||||
xasprintf(&out, "%04x,%s", layout_checksum(layout), layout);
|
||||
|
2
tmux.h
2
tmux.h
@ -2225,7 +2225,7 @@ struct layout_cell *layout_split_pane(
|
||||
void layout_close_pane(struct window_pane *);
|
||||
|
||||
/* layout-custom.c */
|
||||
char *layout_dump(struct window *);
|
||||
char *layout_dump(struct layout_cell *);
|
||||
int layout_parse(struct window *, const char *);
|
||||
|
||||
/* layout-set.c */
|
||||
|
Loading…
Reference in New Issue
Block a user