summaryrefslogtreecommitdiffstats
path: root/cmd-break-pane.c
diff options
context:
space:
mode:
authornicm <nicm>2020-04-13 20:51:57 +0000
committernicm <nicm>2020-04-13 20:51:57 +0000
commit3f7f9a0e20522c73e33480673496240f1bac724b (patch)
treec0ec19a026014bfd6981622ecd9ee2783344ef25 /cmd-break-pane.c
parent187277eaadc4a675659bf7ede88f50bfe6cc7be9 (diff)
Make client -c and -t handling common in cmd-queue.c and try to be
clearer about whether the client is the target client (must have a session) or not.
Diffstat (limited to 'cmd-break-pane.c')
-rw-r--r--cmd-break-pane.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd-break-pane.c b/cmd-break-pane.c
index e12b09b6..880ee7f5 100644
--- a/cmd-break-pane.c
+++ b/cmd-break-pane.c
@@ -52,7 +52,7 @@ cmd_break_pane_exec(struct cmd *self, struct cmdq_item *item)
struct cmd_find_state *current = cmdq_get_current(item);
struct cmd_find_state *target = cmdq_get_target(item);
struct cmd_find_state *source = cmdq_get_source(item);
- struct client *c = cmd_find_client(item, NULL, 1);
+ struct client *tc = cmdq_get_target_client(item);
struct winlink *wl = source->wl;
struct session *src_s = source->s;
struct session *dst_s = target->s;
@@ -83,7 +83,7 @@ cmd_break_pane_exec(struct cmd *self, struct cmdq_item *item)
wp->flags |= PANE_STYLECHANGED;
TAILQ_INSERT_HEAD(&w->panes, wp, entry);
w->active = wp;
- w->latest = c;
+ w->latest = tc;
if (!args_has(args, 'n')) {
name = default_window_name(w);
@@ -115,7 +115,7 @@ cmd_break_pane_exec(struct cmd *self, struct cmdq_item *item)
if (args_has(args, 'P')) {
if ((template = args_get(args, 'F')) == NULL)
template = BREAK_PANE_TEMPLATE;
- cp = format_single(item, template, c, dst_s, wl, wp);
+ cp = format_single(item, template, tc, dst_s, wl, wp);
cmdq_print(item, "%s", cp);
free(cp);
}