From 4289a1ebfa7479413ec5ac543b88c4ea039d00a0 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 13 Oct 2016 22:48:51 +0000 Subject: 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. --- cmd-swap-pane.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'cmd-swap-pane.c') diff --git a/cmd-swap-pane.c b/cmd-swap-pane.c index 2568ac01..e5f5c810 100644 --- a/cmd-swap-pane.c +++ b/cmd-swap-pane.c @@ -124,12 +124,5 @@ cmd_swap_pane_exec(struct cmd *self, struct cmd_q *cmdq) server_redraw_window(src_w); server_redraw_window(dst_w); - cmd_find_clear_state(&cmdq->current, NULL, 0); - cmdq->current.s = cmdq->state.tflag.s; - cmdq->current.wl = cmdq->state.tflag.wl; - cmdq->current.w = dst_w; - cmdq->current.wp = src_wp; - cmd_find_log_state(__func__, &cmdq->current); - return (CMD_RETURN_NORMAL); } -- cgit v1.2.3