diff options
author | 2015-02-05 10:29:43 +0000 | |
---|---|---|
committer | 2015-02-05 10:29:43 +0000 | |
commit | f426771eab9e2362a30890108867d3e8ac72113a (patch) | |
tree | a29c739b6286417a527b2a9ab5372ba4fa486e28 /usr.bin/tmux/cmd-attach-session.c | |
parent | implement SIOCIFAFATTACH and SIOCIFAFDETACH for AF_INET (diff) | |
download | wireguard-openbsd-f426771eab9e2362a30890108867d3e8ac72113a.tar.xz wireguard-openbsd-f426771eab9e2362a30890108867d3e8ac72113a.zip |
Wrap all the individual format_* calls in a single format_defaults
functions.
Diffstat (limited to 'usr.bin/tmux/cmd-attach-session.c')
-rw-r--r-- | usr.bin/tmux/cmd-attach-session.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/usr.bin/tmux/cmd-attach-session.c b/usr.bin/tmux/cmd-attach-session.c index 77d8082cc3e..71b7a03a2f8 100644 --- a/usr.bin/tmux/cmd-attach-session.c +++ b/usr.bin/tmux/cmd-attach-session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-attach-session.c,v 1.31 2014/10/20 22:29:25 nicm Exp $ */ +/* $OpenBSD: cmd-attach-session.c,v 1.32 2015/02/05 10:29:43 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -106,11 +106,8 @@ cmd_attach_session(struct cmd_q *cmdq, const char *tflag, int dflag, int rflag, if (cflag != NULL) { ft = format_create(); - if ((c = cmd_find_client(cmdq, NULL, 1)) != NULL) - format_client(ft, c); - format_session(ft, s); - format_winlink(ft, s, s->curw); - format_window_pane(ft, s->curw->window->active); + format_defaults(ft, cmd_find_client(cmdq, NULL, 1), s, + NULL, NULL); cp = format_expand(ft, cflag); format_free(ft); @@ -139,11 +136,8 @@ cmd_attach_session(struct cmd_q *cmdq, const char *tflag, int dflag, int rflag, if (cflag != NULL) { ft = format_create(); - if ((c = cmd_find_client(cmdq, NULL, 1)) != NULL) - format_client(ft, c); - format_session(ft, s); - format_winlink(ft, s, s->curw); - format_window_pane(ft, s->curw->window->active); + format_defaults(ft, cmd_find_client(cmdq, NULL, 1), s, + NULL, NULL); cp = format_expand(ft, cflag); format_free(ft); |