summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/format.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2019-03-15 15:02:26 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2019-03-15 15:02:26 +0000
commit37e7aabb5cca19f6012c0b4ddcb8050e3a2eec3c (patch)
tree18dcea70fa4274dff06823b8f6a520e045ecdc99 /usr.bin/tmux/format.c
parentf493a1b4f2016f207bdbd2a85133c0e74e5b4eef (diff)
Copy recursion counter into new formats when looping.
Diffstat (limited to 'usr.bin/tmux/format.c')
-rw-r--r--usr.bin/tmux/format.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c
index d39c60ab390..97f83903b8e 100644
--- a/usr.bin/tmux/format.c
+++ b/usr.bin/tmux/format.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: format.c,v 1.181 2019/03/15 10:22:57 nicm Exp $ */
+/* $OpenBSD: format.c,v 1.182 2019/03/15 15:02:25 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1187,6 +1187,7 @@ format_loop_sessions(struct format_tree *ft, const char *fmt)
RB_FOREACH(s, sessions, &sessions) {
format_log(ft, "session loop: $%u", s->id);
nft = format_create(c, item, FORMAT_NONE, ft->flags);
+ nft->loop = ft->loop;
format_defaults(nft, ft->c, s, NULL, NULL);
expanded = format_expand(nft, fmt);
format_free(nft);
@@ -1234,6 +1235,7 @@ format_loop_windows(struct format_tree *ft, const char *fmt)
else
use = all;
nft = format_create(c, item, FORMAT_WINDOW|w->id, ft->flags);
+ nft->loop = ft->loop;
format_defaults(nft, ft->c, ft->s, wl, NULL);
expanded = format_expand(nft, use);
format_free(nft);
@@ -1282,6 +1284,7 @@ format_loop_panes(struct format_tree *ft, const char *fmt)
else
use = all;
nft = format_create(c, item, FORMAT_PANE|wp->id, ft->flags);
+ nft->loop = ft->loop;
format_defaults(nft, ft->c, ft->s, ft->wl, wp);
expanded = format_expand(nft, use);
format_free(nft);