=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/control-notify.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- src/usr.bin/tmux/control-notify.c 2017/02/03 11:57:27 1.19 +++ src/usr.bin/tmux/control-notify.c 2017/03/08 13:36:12 1.20 @@ -1,4 +1,4 @@ -/* $OpenBSD: control-notify.c,v 1.19 2017/02/03 11:57:27 nicm Exp $ */ +/* $OpenBSD: control-notify.c,v 1.20 2017/03/08 13:36:12 nicm Exp $ */ /* * Copyright (c) 2012 Nicholas Marriott @@ -64,10 +64,9 @@ { 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 @@ 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); } }