summaryrefslogtreecommitdiffstats
path: root/cmd-break-pane.c
diff options
context:
space:
mode:
authornicm <nicm>2016-10-16 19:04:05 +0000
committernicm <nicm>2016-10-16 19:04:05 +0000
commitb342bd0b462f69a9fc9a59d52bcd4bb34b57114f (patch)
tree2da71181e3b540b8b52422cb598682f1505c2e89 /cmd-break-pane.c
parentddc4512d2e0eda6c705e002cb5dbf80719d709e1 (diff)
Mass rename struct cmd_q to struct cmdq_item and related.
Diffstat (limited to 'cmd-break-pane.c')
-rw-r--r--cmd-break-pane.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/cmd-break-pane.c b/cmd-break-pane.c
index 75562750..a5d4e148 100644
--- a/cmd-break-pane.c
+++ b/cmd-break-pane.c
@@ -28,7 +28,7 @@
#define BREAK_PANE_TEMPLATE "#{session_name}:#{window_index}.#{pane_index}"
-static enum cmd_retval cmd_break_pane_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_break_pane_exec(struct cmd *, struct cmdq_item *);
const struct cmd_entry cmd_break_pane_entry = {
.name = "break-pane",
@@ -45,28 +45,28 @@ const struct cmd_entry cmd_break_pane_entry = {
};
static enum cmd_retval
-cmd_break_pane_exec(struct cmd *self, struct cmd_q *cmdq)
+cmd_break_pane_exec(struct cmd *self, struct cmdq_item *item)
{
struct args *args = self->args;
- struct winlink *wl = cmdq->state.sflag.wl;
- struct session *src_s = cmdq->state.sflag.s;
- struct session *dst_s = cmdq->state.tflag.s;
- struct window_pane *wp = cmdq->state.sflag.wp;
+ struct winlink *wl = item->state.sflag.wl;
+ struct session *src_s = item->state.sflag.s;
+ struct session *dst_s = item->state.tflag.s;
+ struct window_pane *wp = item->state.sflag.wp;
struct window *w = wl->window;
char *name;
char *cause;
- int idx = cmdq->state.tflag.idx;
+ int idx = item->state.tflag.idx;
struct format_tree *ft;
const char *template;
char *cp;
if (idx != -1 && winlink_find_by_index(&dst_s->windows, idx) != NULL) {
- cmdq_error(cmdq, "index %d already in use", idx);
+ cmdq_error(item, "index %d already in use", idx);
return (CMD_RETURN_ERROR);
}
if (window_count_panes(w) == 1) {
- cmdq_error(cmdq, "can't break with only one pane");
+ cmdq_error(item, "can't break with only one pane");
return (CMD_RETURN_ERROR);
}
server_unzoom_window(w);
@@ -101,11 +101,11 @@ cmd_break_pane_exec(struct cmd *self, struct cmd_q *cmdq)
if ((template = args_get(args, 'F')) == NULL)
template = BREAK_PANE_TEMPLATE;
- ft = format_create(cmdq, 0);
- format_defaults(ft, cmdq->state.c, dst_s, wl, wp);
+ ft = format_create(item, 0);
+ format_defaults(ft, item->state.c, dst_s, wl, wp);
cp = format_expand(ft, template);
- cmdq_print(cmdq, "%s", cp);
+ cmdq_print(item, "%s", cp);
free(cp);
format_free(ft);