mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-03 16:46:18 +00:00 
			
		
		
		
	Move the single command flag (CMD_CONTROL) into the shared flags.
This commit is contained in:
		@@ -266,13 +266,14 @@ static enum cmd_retval
 | 
				
			|||||||
cmdq_fire_command(struct cmdq_item *item)
 | 
					cmdq_fire_command(struct cmdq_item *item)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct client		*c = item->client;
 | 
						struct client		*c = item->client;
 | 
				
			||||||
 | 
						struct cmdq_shared	*shared = item->shared;
 | 
				
			||||||
	struct cmd		*cmd = item->cmd;
 | 
						struct cmd		*cmd = item->cmd;
 | 
				
			||||||
	const struct cmd_entry	*entry = cmd->entry;
 | 
						const struct cmd_entry	*entry = cmd->entry;
 | 
				
			||||||
	enum cmd_retval		 retval;
 | 
						enum cmd_retval		 retval;
 | 
				
			||||||
	struct cmd_find_state	*fsp, fs;
 | 
						struct cmd_find_state	*fsp, fs;
 | 
				
			||||||
	int			 flags;
 | 
						int			 flags;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	flags = !!(cmd->flags & CMD_CONTROL);
 | 
						flags = !!(shared->flags & CMDQ_SHARED_CONTROL);
 | 
				
			||||||
	cmdq_guard(item, "begin", flags);
 | 
						cmdq_guard(item, "begin", flags);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (item->client == NULL)
 | 
						if (item->client == NULL)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -70,7 +70,6 @@ control_callback(struct client *c, int closed, __unused void *data)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	char			*line, *cause;
 | 
						char			*line, *cause;
 | 
				
			||||||
	struct cmd_list		*cmdlist;
 | 
						struct cmd_list		*cmdlist;
 | 
				
			||||||
	struct cmd		*cmd;
 | 
					 | 
				
			||||||
	struct cmdq_item	*item;
 | 
						struct cmdq_item	*item;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (closed)
 | 
						if (closed)
 | 
				
			||||||
@@ -90,9 +89,8 @@ control_callback(struct client *c, int closed, __unused void *data)
 | 
				
			|||||||
			item = cmdq_get_callback(control_error, cause);
 | 
								item = cmdq_get_callback(control_error, cause);
 | 
				
			||||||
			cmdq_append(c, item);
 | 
								cmdq_append(c, item);
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			TAILQ_FOREACH(cmd, &cmdlist->list, qentry)
 | 
					 | 
				
			||||||
				cmd->flags |= CMD_CONTROL;
 | 
					 | 
				
			||||||
			item = cmdq_get_command(cmdlist, NULL, NULL, 0);
 | 
								item = cmdq_get_command(cmdlist, NULL, NULL, 0);
 | 
				
			||||||
 | 
								item->shared->flags |= CMDQ_SHARED_CONTROL;
 | 
				
			||||||
			cmdq_append(c, item);
 | 
								cmdq_append(c, item);
 | 
				
			||||||
			cmd_list_free(cmdlist);
 | 
								cmd_list_free(cmdlist);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										4
									
								
								tmux.h
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								tmux.h
									
									
									
									
									
								
							@@ -1285,9 +1285,6 @@ struct cmd {
 | 
				
			|||||||
	char			*file;
 | 
						char			*file;
 | 
				
			||||||
	u_int			 line;
 | 
						u_int			 line;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define CMD_CONTROL 0x1
 | 
					 | 
				
			||||||
	int			 flags;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	TAILQ_ENTRY(cmd)	 qentry;
 | 
						TAILQ_ENTRY(cmd)	 qentry;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1316,6 +1313,7 @@ struct cmdq_shared {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	int			 flags;
 | 
						int			 flags;
 | 
				
			||||||
#define CMDQ_SHARED_REPEAT 0x1
 | 
					#define CMDQ_SHARED_REPEAT 0x1
 | 
				
			||||||
 | 
					#define CMDQ_SHARED_CONTROL 0x2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	struct format_tree	*formats;
 | 
						struct format_tree	*formats;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user