diff options
author | 2020-04-13 14:46:04 +0000 | |
---|---|---|
committer | 2020-04-13 14:46:04 +0000 | |
commit | 823b6d6db0ffd5d96b269d4d060f7f6c4d950da6 (patch) | |
tree | 55f26292d7170ca3b6f606980e1b3e96e7c2bd8f /usr.bin/tmux/cmd-resize-pane.c | |
parent | Rename cmdq_shared to cmdq_state which will better reflect what it is (diff) | |
download | wireguard-openbsd-823b6d6db0ffd5d96b269d4d060f7f6c4d950da6.tar.xz wireguard-openbsd-823b6d6db0ffd5d96b269d4d060f7f6c4d950da6.zip |
Move cmdq_state into cmd-queue.c.
Diffstat (limited to 'usr.bin/tmux/cmd-resize-pane.c')
-rw-r--r-- | usr.bin/tmux/cmd-resize-pane.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tmux/cmd-resize-pane.c b/usr.bin/tmux/cmd-resize-pane.c index 0d8c12ad0f1..cbc761d093b 100644 --- a/usr.bin/tmux/cmd-resize-pane.c +++ b/usr.bin/tmux/cmd-resize-pane.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-resize-pane.c,v 1.45 2020/04/13 14:04:25 nicm Exp $ */ +/* $OpenBSD: cmd-resize-pane.c,v 1.46 2020/04/13 14:46:04 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -50,8 +50,8 @@ static enum cmd_retval cmd_resize_pane_exec(struct cmd *self, struct cmdq_item *item) { struct args *args = cmd_get_args(self); - struct cmdq_state *state = cmdq_get_state(item); struct cmd_find_state *target = cmdq_get_target(item); + struct key_event *event = cmdq_get_event(item); struct window_pane *wp = target->wp; struct winlink *wl = target->wl; struct window *w = wl->window; @@ -76,12 +76,12 @@ cmd_resize_pane_exec(struct cmd *self, struct cmdq_item *item) } if (args_has(args, 'M')) { - if (cmd_mouse_window(&state->event.m, &s) == NULL) + if (!event->m.valid || cmd_mouse_window(&event->m, &s) == NULL) return (CMD_RETURN_NORMAL); if (c == NULL || c->session != s) return (CMD_RETURN_NORMAL); c->tty.mouse_drag_update = cmd_resize_pane_mouse_update; - cmd_resize_pane_mouse_update(c, &state->event.m); + cmd_resize_pane_mouse_update(c, &event->m); return (CMD_RETURN_NORMAL); } |