diff options
author | nicm <nicm> | 2016-10-13 22:48:51 +0000 |
---|---|---|
committer | nicm <nicm> | 2016-10-13 22:48:51 +0000 |
commit | 4289a1ebfa7479413ec5ac543b88c4ea039d00a0 (patch) | |
tree | d17862b06b8822aa1b8ab91d83e51a47e25e60e3 /cmd-swap-window.c | |
parent | 7a1a01feeff7b2ab17e2caef2d6b2180a8c1e70e (diff) | |
download | rtmux-4289a1ebfa7479413ec5ac543b88c4ea039d00a0.tar.gz rtmux-4289a1ebfa7479413ec5ac543b88c4ea039d00a0.tar.bz2 rtmux-4289a1ebfa7479413ec5ac543b88c4ea039d00a0.zip |
Trying to do hooks generically is way too complicated and unreliable and
confusing, particularly trying to automatically figure out what target
hooks should be using. So simplify it:
- drop before hooks entirely, they don't seem to be very useful;
- commands with special requirements now fire their own after hook (for
example, if they change session or window, or if they have -t and -s
and need to choose which one the hook uses as current target);
- commands with no special requirements can have the CMD_AFTERHOOK flag
added and they will use the -t state.
At the moment new-session, new-window, split-window fire their own hook,
and display-message uses the flag. The remaining commands still need to
be looked at.
Diffstat (limited to 'cmd-swap-window.c')
-rw-r--r-- | cmd-swap-window.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/cmd-swap-window.c b/cmd-swap-window.c index 2d2767c4..904a974d 100644 --- a/cmd-swap-window.c +++ b/cmd-swap-window.c @@ -84,12 +84,5 @@ cmd_swap_window_exec(struct cmd *self, struct cmd_q *cmdq) } recalculate_sizes(); - cmd_find_clear_state(&cmdq->current, NULL, 0); - cmdq->current.s = dst; - cmdq->current.wl = wl_dst; - cmdq->current.w = wl_dst->window; - cmdq->current.wp = cmdq->state.sflag.wp; - cmd_find_log_state(__func__, &cmdq->current); - return (CMD_RETURN_NORMAL); } |