mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Add 'e' key in buffer mode to open the buffer in an editor.
This commit is contained in:
		
							
								
								
									
										9
									
								
								popup.c
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								popup.c
									
									
									
									
									
								
							@@ -40,6 +40,8 @@ struct popup_data {
 | 
			
		||||
	struct job		 *job;
 | 
			
		||||
	struct input_ctx	 *ictx;
 | 
			
		||||
	int			  status;
 | 
			
		||||
	popup_close_cb		  cb;
 | 
			
		||||
	void			 *arg;
 | 
			
		||||
 | 
			
		||||
	u_int			  px;
 | 
			
		||||
	u_int			  py;
 | 
			
		||||
@@ -150,6 +152,9 @@ popup_free_cb(struct client *c)
 | 
			
		||||
	struct cmdq_item	*item = pd->item;
 | 
			
		||||
	u_int			 i;
 | 
			
		||||
 | 
			
		||||
	if (pd->cb != NULL)
 | 
			
		||||
		pd->cb(pd->status, pd->arg);
 | 
			
		||||
 | 
			
		||||
	if (item != NULL) {
 | 
			
		||||
		if (pd->ictx != NULL &&
 | 
			
		||||
		    cmdq_get_client(item) != NULL &&
 | 
			
		||||
@@ -403,7 +408,7 @@ int
 | 
			
		||||
popup_display(int flags, struct cmdq_item *item, u_int px, u_int py, u_int sx,
 | 
			
		||||
    u_int sy, u_int nlines, const char **lines, const char *shellcmd,
 | 
			
		||||
    const char *cmd, const char *cwd, struct client *c,
 | 
			
		||||
    struct cmd_find_state *fs)
 | 
			
		||||
    struct cmd_find_state *fs, popup_close_cb cb, void *arg)
 | 
			
		||||
{
 | 
			
		||||
	struct popup_data	*pd;
 | 
			
		||||
	u_int			 i;
 | 
			
		||||
@@ -422,6 +427,8 @@ popup_display(int flags, struct cmdq_item *item, u_int px, u_int py, u_int sx,
 | 
			
		||||
	pd->c = c;
 | 
			
		||||
	pd->c->references++;
 | 
			
		||||
 | 
			
		||||
	pd->cb = cb;
 | 
			
		||||
	pd->arg = arg;
 | 
			
		||||
	pd->status = 128 + SIGHUP;
 | 
			
		||||
 | 
			
		||||
	if (fs != NULL)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user