summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/popup.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2020-04-13 11:00:00 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2020-04-13 11:00:00 +0000
commit56530d4d9e327bc4c76b8b02290102a1fadfffb9 (patch)
treec902ce5f812b38436dec697a5fa08bf3615c0ed4 /usr.bin/tmux/popup.c
parent9947eee19da9830a3c591d7fb4574df8cdd144e6 (diff)
Also move cmdq_item and cmdq_list into cmd-queue.c (this is to make its
use more clearly defined and preparation for some future work).
Diffstat (limited to 'usr.bin/tmux/popup.c')
-rw-r--r--usr.bin/tmux/popup.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/tmux/popup.c b/usr.bin/tmux/popup.c
index bd061cf0cf2..ec331d8a9d5 100644
--- a/usr.bin/tmux/popup.c
+++ b/usr.bin/tmux/popup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: popup.c,v 1.7 2020/04/07 13:33:00 nicm Exp $ */
+/* $OpenBSD: popup.c,v 1.8 2020/04/13 10:59:59 nicm Exp $ */
/*
* Copyright (c) 2020 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -64,7 +64,7 @@ popup_write_screen(struct client *c, struct popup_data *pd)
struct format_tree *ft;
u_int i, y;
- ft = format_create(item->client, item, FORMAT_NONE, 0);
+ ft = format_create(c, item, FORMAT_NONE, 0);
if (cmd_find_valid_state(&pd->fs))
format_defaults(ft, c, pd->fs.s, pd->fs.wl, pd->fs.wp);
else
@@ -152,9 +152,9 @@ popup_free_cb(struct client *c)
if (item != NULL) {
if (pd->ictx != NULL &&
- item->client != NULL &&
- item->client->session == NULL)
- item->client->retval = pd->status;
+ cmdq_get_client(item) != NULL &&
+ cmdq_get_client(item)->session == NULL)
+ cmdq_get_client(item)->retval = pd->status;
cmdq_continue(item);
}
server_client_unref(pd->c);
@@ -305,7 +305,7 @@ popup_key_cb(struct client *c, struct key_event *event)
break;
case CMD_PARSE_SUCCESS:
if (pd->item != NULL)
- m = &pd->item->shared->mouse;
+ m = &cmdq_get_shared(pd->item)->mouse;
else
m = NULL;
new_item = cmdq_get_command(pr->cmdlist, fs, m, 0);
@@ -382,7 +382,7 @@ popup_width(struct cmdq_item *item, u_int nlines, const char **lines,
struct format_tree *ft;
u_int i, width = 0, tmpwidth;
- ft = format_create(item->client, item, FORMAT_NONE, 0);
+ ft = format_create(cmdq_get_client(item), item, FORMAT_NONE, 0);
if (fs != NULL && cmd_find_valid_state(fs))
format_defaults(ft, c, fs->s, fs->wl, fs->wp);
else