mirror of
https://github.com/tmux/tmux.git
synced 2025-04-02 05:48:49 +00:00
Nic's patch, back out my mod to format.c, but still remove the return
This commit is contained in:
parent
86b6480081
commit
5263766303
10
format.c
10
format.c
@ -5104,17 +5104,11 @@ format_create_defaults(struct cmdq_item *item, struct client *c,
|
||||
struct session *s, struct winlink *wl, struct window_pane *wp)
|
||||
{
|
||||
struct format_tree *ft;
|
||||
int tag;
|
||||
|
||||
if (wp == NULL)
|
||||
tag = FORMAT_NONE;
|
||||
else
|
||||
tag = FORMAT_PANE|wp->id;
|
||||
|
||||
if (item != NULL)
|
||||
ft = format_create(cmdq_get_client(item), item, tag, 0);
|
||||
ft = format_create(cmdq_get_client(item), item, FORMAT_NONE, 0);
|
||||
else
|
||||
ft = format_create(NULL, item, tag, 0);
|
||||
ft = format_create(NULL, item, FORMAT_NONE, 0);
|
||||
format_defaults(ft, c, s, wl, wp);
|
||||
return (ft);
|
||||
}
|
||||
|
@ -302,6 +302,7 @@ window_tree_build_pane(struct session *s, struct winlink *wl,
|
||||
struct window_tree_itemdata *item;
|
||||
char *name, *text;
|
||||
u_int idx;
|
||||
struct format_tree *ft;
|
||||
|
||||
window_pane_index(wp, &idx);
|
||||
|
||||
@ -311,8 +312,11 @@ window_tree_build_pane(struct session *s, struct winlink *wl,
|
||||
item->winlink = wl->idx;
|
||||
item->pane = wp->id;
|
||||
|
||||
text = format_single(NULL, data->format, NULL, s, wl, wp);
|
||||
ft = format_create(NULL, NULL, FORMAT_PANE|wp->id, 0);
|
||||
format_defaults(ft, NULL, s, wl, wp);
|
||||
text = format_expand(ft, data->format);
|
||||
xasprintf(&name, "%u", idx);
|
||||
format_free(ft);
|
||||
|
||||
mode_tree_add(data->data, parent, item, (uint64_t)wp, name, text, -1);
|
||||
free(text);
|
||||
@ -348,6 +352,7 @@ window_tree_build_window(struct session *s, struct winlink *wl,
|
||||
struct window_pane *wp, **l;
|
||||
u_int n, i;
|
||||
int expanded;
|
||||
struct format_tree *ft;
|
||||
|
||||
item = window_tree_add_item(data);
|
||||
item->type = WINDOW_TREE_WINDOW;
|
||||
@ -355,8 +360,11 @@ window_tree_build_window(struct session *s, struct winlink *wl,
|
||||
item->winlink = wl->idx;
|
||||
item->pane = -1;
|
||||
|
||||
text = format_single(NULL, data->format, NULL, s, wl, NULL);
|
||||
ft = format_create(NULL, NULL, FORMAT_PANE|wl->window->active->id, 0);
|
||||
format_defaults(ft, NULL, s, wl, NULL);
|
||||
text = format_expand(ft, data->format);
|
||||
xasprintf(&name, "%u", wl->idx);
|
||||
format_free(ft);
|
||||
|
||||
if (data->type == WINDOW_TREE_SESSION ||
|
||||
data->type == WINDOW_TREE_WINDOW)
|
||||
@ -410,9 +418,10 @@ window_tree_build_session(struct session *s, void *modedata,
|
||||
struct window_tree_itemdata *item;
|
||||
struct mode_tree_item *mti;
|
||||
char *text;
|
||||
struct winlink *wl, **l;
|
||||
struct winlink *wl = s->curw, **l;
|
||||
u_int n, i, empty;
|
||||
int expanded;
|
||||
struct format_tree *ft;
|
||||
|
||||
item = window_tree_add_item(data);
|
||||
item->type = WINDOW_TREE_SESSION;
|
||||
@ -420,7 +429,10 @@ window_tree_build_session(struct session *s, void *modedata,
|
||||
item->winlink = -1;
|
||||
item->pane = -1;
|
||||
|
||||
text = format_single(NULL, data->format, NULL, s, NULL, NULL);
|
||||
ft = format_create(NULL, NULL, FORMAT_PANE|wl->window->active->id, 0);
|
||||
format_defaults(ft, NULL, s, NULL, NULL);
|
||||
text = format_expand(ft, data->format);
|
||||
format_free(ft);
|
||||
|
||||
if (data->type == WINDOW_TREE_SESSION)
|
||||
expanded = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user