mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	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.
This commit is contained in:
		@@ -156,12 +156,5 @@ cmd_join_pane_exec(struct cmd *self, struct cmd_q *cmdq)
 | 
			
		||||
		notify_window_layout_changed(src_w);
 | 
			
		||||
	notify_window_layout_changed(dst_w);
 | 
			
		||||
 | 
			
		||||
	cmd_find_clear_state(&cmdq->current, NULL, 0);
 | 
			
		||||
	cmdq->current.s = dst_s;
 | 
			
		||||
	cmdq->current.wl = dst_wl;
 | 
			
		||||
	cmdq->current.w = dst_w;
 | 
			
		||||
	cmdq->current.wp = dst_wp;
 | 
			
		||||
	cmd_find_log_state(__func__, &cmdq->current);
 | 
			
		||||
 | 
			
		||||
	return (CMD_RETURN_NORMAL);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user