summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-swap-window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2017-02-09 15:04:54 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2017-02-09 15:04:54 +0000
commitdb7e392b45e8f2dbbe7184dbe24a4b3c4600c1b0 (patch)
tree8eb075d2ec1c2599e06f29c698b7437075602ba9 /usr.bin/tmux/cmd-swap-window.c
parente3097dffa34ae8d4bc2eeb7037c01eb03dad78af (diff)
Instead of numbering session groups, give them a name which may be given
to -t instead of a target session. Also allow them to contain only one session.
Diffstat (limited to 'usr.bin/tmux/cmd-swap-window.c')
-rw-r--r--usr.bin/tmux/cmd-swap-window.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-swap-window.c b/usr.bin/tmux/cmd-swap-window.c
index 5172028efce..97b19908b42 100644
--- a/usr.bin/tmux/cmd-swap-window.c
+++ b/usr.bin/tmux/cmd-swap-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-swap-window.c,v 1.21 2016/12/14 17:38:59 nicm Exp $ */
+/* $OpenBSD: cmd-swap-window.c,v 1.22 2017/02/09 15:04:53 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -52,11 +52,11 @@ cmd_swap_window_exec(struct cmd *self, struct cmdq_item *item)
wl_src = item->state.sflag.wl;
src = item->state.sflag.s;
- sg_src = session_group_find(src);
+ sg_src = session_group_contains(src);
wl_dst = item->state.tflag.wl;
dst = item->state.tflag.s;
- sg_dst = session_group_find(dst);
+ sg_dst = session_group_contains(dst);
if (src != dst && sg_src != NULL && sg_dst != NULL &&
sg_src == sg_dst) {