aboutsummaryrefslogtreecommitdiff
path: root/control-notify.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2017-03-09 15:39:36 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2017-03-09 15:39:36 +0000
commit180ebf02081087eec625a25c785985f5d6b5eff4 (patch)
tree7d995692ed6007c747da0caa2b189aadfac91917 /control-notify.c
parent514a723f7489123371bded176355ead48f338ae0 (diff)
parent92434b0afdf9cf04f1067c4e782b3132002b267a (diff)
downloadrtmux-180ebf02081087eec625a25c785985f5d6b5eff4.tar.gz
rtmux-180ebf02081087eec625a25c785985f5d6b5eff4.tar.bz2
rtmux-180ebf02081087eec625a25c785985f5d6b5eff4.zip
Merge branch 'master' of github.com:tmux/tmux
Diffstat (limited to 'control-notify.c')
-rw-r--r--control-notify.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/control-notify.c b/control-notify.c
index 3b2d32eb..230bce61 100644
--- a/control-notify.c
+++ b/control-notify.c
@@ -64,10 +64,9 @@ control_notify_window_layout_changed(struct window *w)
{
struct client *c;
struct session *s;
- struct format_tree *ft;
struct winlink *wl;
const char *template;
- char *expanded;
+ char *cp;
template = "%layout-change #{window_id} #{window_layout} "
"#{window_visible_layout} #{window_flags}";
@@ -88,15 +87,12 @@ control_notify_window_layout_changed(struct window *w)
if (w->layout_root == NULL)
continue;
- ft = format_create(NULL, FORMAT_NONE, 0);
wl = winlink_find_by_window(&s->windows, w);
if (wl != NULL) {
- format_defaults(ft, c, NULL, wl, NULL);
- expanded = format_expand(ft, template);
- control_write(c, "%s", expanded);
- free(expanded);
+ cp = format_single(NULL, template, c, NULL, wl, NULL);
+ control_write(c, "%s", cp);
+ free(cp);
}
- format_free(ft);
}
}