mirror of
https://github.com/tmate-io/tmate-ssh-server.git
synced 2020-11-18 19:53:51 -08: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;
|
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_id", "@%u", w->id);
|
||||||
format_add(ft, "window_name", "%s", w->name);
|
format_add(ft, "window_name", "%s", w->name);
|
||||||
|
@ -55,12 +55,12 @@ layout_checksum(const char *layout)
|
|||||||
|
|
||||||
/* Dump layout as a string. */
|
/* Dump layout as a string. */
|
||||||
char *
|
char *
|
||||||
layout_dump(struct window *w)
|
layout_dump(struct layout_cell *root)
|
||||||
{
|
{
|
||||||
char layout[BUFSIZ], *out;
|
char layout[BUFSIZ], *out;
|
||||||
|
|
||||||
*layout = '\0';
|
*layout = '\0';
|
||||||
if (layout_append(w->layout_root, layout, sizeof layout) != 0)
|
if (layout_append(root, layout, sizeof layout) != 0)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
xasprintf(&out, "%04x,%s", layout_checksum(layout), layout);
|
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 *);
|
void layout_close_pane(struct window_pane *);
|
||||||
|
|
||||||
/* layout-custom.c */
|
/* layout-custom.c */
|
||||||
char *layout_dump(struct window *);
|
char *layout_dump(struct layout_cell *);
|
||||||
int layout_parse(struct window *, const char *);
|
int layout_parse(struct window *, const char *);
|
||||||
|
|
||||||
/* layout-set.c */
|
/* layout-set.c */
|
||||||
|
1
window.c
1
window.c
@ -519,6 +519,7 @@ window_unzoom(struct window *w)
|
|||||||
w->flags &= ~WINDOW_ZOOMED;
|
w->flags &= ~WINDOW_ZOOMED;
|
||||||
layout_free(w);
|
layout_free(w);
|
||||||
w->layout_root = w->saved_layout_root;
|
w->layout_root = w->saved_layout_root;
|
||||||
|
w->saved_layout_root = NULL;
|
||||||
|
|
||||||
TAILQ_FOREACH(wp, &w->panes, entry) {
|
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||||
wp->layout_cell = wp->saved_layout_cell;
|
wp->layout_cell = wp->saved_layout_cell;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user