diff options
author | nicm <nicm> | 2017-04-21 14:01:19 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-04-21 14:01:19 +0000 |
commit | bba588752f8085da13edcacd71101055bd617303 (patch) | |
tree | b75e32cccebefb24cda475bed163f613a2994548 /cmd-resize-pane.c | |
parent | 311dad8c28c8c1a842beb3dbb1757064b9d83b2e (diff) | |
download | rtmux-bba588752f8085da13edcacd71101055bd617303.tar.gz rtmux-bba588752f8085da13edcacd71101055bd617303.tar.bz2 rtmux-bba588752f8085da13edcacd71101055bd617303.zip |
Store state shared between multiple commands in the queue in a shared
structure.
Diffstat (limited to 'cmd-resize-pane.c')
-rw-r--r-- | cmd-resize-pane.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd-resize-pane.c b/cmd-resize-pane.c index 37bfcece..b9755c1f 100644 --- a/cmd-resize-pane.c +++ b/cmd-resize-pane.c @@ -49,6 +49,7 @@ static enum cmd_retval cmd_resize_pane_exec(struct cmd *self, struct cmdq_item *item) { struct args *args = self->args; + struct cmdq_shared *shared = item->shared; struct window_pane *wp = item->state.tflag.wp; struct winlink *wl = item->state.tflag.wl; struct window *w = wl->window; @@ -60,12 +61,12 @@ cmd_resize_pane_exec(struct cmd *self, struct cmdq_item *item) int x, y; if (args_has(args, 'M')) { - if (cmd_mouse_window(&item->mouse, &s) == NULL) + if (cmd_mouse_window(&shared->mouse, &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, &item->mouse); + cmd_resize_pane_mouse_update(c, &shared->mouse); return (CMD_RETURN_NORMAL); } |