mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 01:34:18 +00:00 
			
		
		
		
	mode_key_entry can go into mode-key.c; also a few spaces->tabs.
This commit is contained in:
		
							
								
								
									
										14
									
								
								mode-key.c
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								mode-key.c
									
									
									
									
									
								
							@@ -38,6 +38,20 @@
 | 
				
			|||||||
 * (any matching MODEKEYEDIT_SWITCHMODE*) are special-cased to do this.
 | 
					 * (any matching MODEKEYEDIT_SWITCHMODE*) are special-cased to do this.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* Entry in the default mode key tables. */
 | 
				
			||||||
 | 
					struct mode_key_entry {
 | 
				
			||||||
 | 
						int			key;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/*
 | 
				
			||||||
 | 
						 * Editing mode for vi: 0 is edit mode, keys not in the table are
 | 
				
			||||||
 | 
						 * returned as MODEKEY_OTHER; 1 is command mode, keys not in the table
 | 
				
			||||||
 | 
						 * are returned as MODEKEY_NONE. This is also matched on, allowing some
 | 
				
			||||||
 | 
						 * keys to be bound in edit mode.
 | 
				
			||||||
 | 
						 */
 | 
				
			||||||
 | 
						int			mode;
 | 
				
			||||||
 | 
						enum mode_key_cmd	cmd;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Edit keys command strings. */
 | 
					/* Edit keys command strings. */
 | 
				
			||||||
const struct mode_key_cmdstr mode_key_cmdstr_edit[] = {
 | 
					const struct mode_key_cmdstr mode_key_cmdstr_edit[] = {
 | 
				
			||||||
	{ MODEKEYEDIT_BACKSPACE, "backspace" },
 | 
						{ MODEKEYEDIT_BACKSPACE, "backspace" },
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										27
									
								
								tmux.h
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								tmux.h
									
									
									
									
									
								
							@@ -566,20 +566,6 @@ enum mode_key_cmd {
 | 
				
			|||||||
	MODEKEYCOPY_UP,
 | 
						MODEKEYCOPY_UP,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Entry in the default mode key tables. */
 | 
					 | 
				
			||||||
struct mode_key_entry {
 | 
					 | 
				
			||||||
	int			key;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	/*
 | 
					 | 
				
			||||||
	 * Editing mode for vi: 0 is edit mode, keys not in the table are
 | 
					 | 
				
			||||||
	 * returned as MODEKEY_OTHER; 1 is command mode, keys not in the table
 | 
					 | 
				
			||||||
	 * are returned as MODEKEY_NONE. This is also matched on, allowing some
 | 
					 | 
				
			||||||
	 * keys to be bound in edit mode.
 | 
					 | 
				
			||||||
	 */
 | 
					 | 
				
			||||||
	int			mode;
 | 
					 | 
				
			||||||
	enum mode_key_cmd	cmd;
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/* Data required while mode keys are in use. */
 | 
					/* Data required while mode keys are in use. */
 | 
				
			||||||
struct mode_key_data {
 | 
					struct mode_key_data {
 | 
				
			||||||
	struct mode_key_tree   *tree;
 | 
						struct mode_key_tree   *tree;
 | 
				
			||||||
@@ -607,6 +593,7 @@ struct mode_key_cmdstr {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Named mode key table description. */
 | 
					/* Named mode key table description. */
 | 
				
			||||||
 | 
					struct mode_key_entry;
 | 
				
			||||||
struct mode_key_table {
 | 
					struct mode_key_table {
 | 
				
			||||||
	const char			*name;
 | 
						const char			*name;
 | 
				
			||||||
	const struct mode_key_cmdstr	*cmdstr;
 | 
						const struct mode_key_cmdstr	*cmdstr;
 | 
				
			||||||
@@ -1192,16 +1179,16 @@ struct tty_ctx {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/* Saved message entry. */
 | 
					/* Saved message entry. */
 | 
				
			||||||
struct message_entry {
 | 
					struct message_entry {
 | 
				
			||||||
	char   *msg;
 | 
						char	*msg;
 | 
				
			||||||
	u_int	msg_num;
 | 
						u_int	 msg_num;
 | 
				
			||||||
	time_t	msg_time;
 | 
						time_t	 msg_time;
 | 
				
			||||||
	TAILQ_ENTRY(message_entry) entry;
 | 
						TAILQ_ENTRY(message_entry) entry;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Status output data from a job. */
 | 
					/* Status output data from a job. */
 | 
				
			||||||
struct status_out {
 | 
					struct status_out {
 | 
				
			||||||
	char   *cmd;
 | 
						char	*cmd;
 | 
				
			||||||
	char   *out;
 | 
						char	*out;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	RB_ENTRY(status_out) entry;
 | 
						RB_ENTRY(status_out) entry;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
@@ -1322,6 +1309,7 @@ struct cmd {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	TAILQ_ENTRY(cmd)	 qentry;
 | 
						TAILQ_ENTRY(cmd)	 qentry;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct cmd_list {
 | 
					struct cmd_list {
 | 
				
			||||||
	int		 	 references;
 | 
						int		 	 references;
 | 
				
			||||||
	TAILQ_HEAD(, cmd) 	 list;
 | 
						TAILQ_HEAD(, cmd) 	 list;
 | 
				
			||||||
@@ -1394,6 +1382,7 @@ struct key_binding {
 | 
				
			|||||||
	RB_ENTRY(key_binding)	 entry;
 | 
						RB_ENTRY(key_binding)	 entry;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
RB_HEAD(key_bindings, key_binding);
 | 
					RB_HEAD(key_bindings, key_binding);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct key_table {
 | 
					struct key_table {
 | 
				
			||||||
	const char		 *name;
 | 
						const char		 *name;
 | 
				
			||||||
	struct key_bindings	 key_bindings;
 | 
						struct key_bindings	 key_bindings;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user