diff options
author | Thomas Adam <thomas@xteddy.org> | 2016-10-12 09:45:49 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2016-10-12 09:45:49 +0100 |
commit | b9dc855016cf79c8bb8469c272dbc6bca24deadc (patch) | |
tree | a2049bea7b17ededbd12b77110d47353ed832e46 /cmd-join-pane.c | |
parent | 27126f87976c63161fcae2ab1eb9c6df726a84ff (diff) | |
parent | 5c49e1d0c1afaf98512b2ffd1f31d91fecff9851 (diff) | |
download | rtmux-b9dc855016cf79c8bb8469c272dbc6bca24deadc.tar.gz rtmux-b9dc855016cf79c8bb8469c272dbc6bca24deadc.tar.bz2 rtmux-b9dc855016cf79c8bb8469c272dbc6bca24deadc.zip |
Merge branch 'obsd-master'
Conflicts:
format.c
osdep-openbsd.c
Diffstat (limited to 'cmd-join-pane.c')
-rw-r--r-- | cmd-join-pane.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/cmd-join-pane.c b/cmd-join-pane.c index 933958a1..c5f6cc16 100644 --- a/cmd-join-pane.c +++ b/cmd-join-pane.c @@ -28,9 +28,7 @@ * Join or move a pane into another (like split/swap/kill). */ -enum cmd_retval cmd_join_pane_exec(struct cmd *, struct cmd_q *); - -enum cmd_retval join_pane(struct cmd *, struct cmd_q *, int); +static enum cmd_retval cmd_join_pane_exec(struct cmd *, struct cmd_q *); const struct cmd_entry cmd_join_pane_entry = { .name = "join-pane", @@ -60,15 +58,9 @@ const struct cmd_entry cmd_move_pane_entry = { .exec = cmd_join_pane_exec }; -enum cmd_retval +static enum cmd_retval cmd_join_pane_exec(struct cmd *self, struct cmd_q *cmdq) { - return (join_pane(self, cmdq, self->entry == &cmd_join_pane_entry)); -} - -enum cmd_retval -join_pane(struct cmd *self, struct cmd_q *cmdq, int not_same_window) -{ struct args *args = self->args; struct session *dst_s; struct winlink *src_wl, *dst_wl; @@ -78,6 +70,12 @@ join_pane(struct cmd *self, struct cmd_q *cmdq, int not_same_window) int size, percentage, dst_idx; enum layout_type type; struct layout_cell *lc; + int not_same_window; + + if (self->entry == &cmd_join_pane_entry) + not_same_window = 1; + else + not_same_window = 0; dst_s = cmdq->state.tflag.s; dst_wl = cmdq->state.tflag.wl; |