mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Add a format for the last search string in copy mode and fix the prompt
so it can work when in -I, suggested by Suraj N Kurapati.
This commit is contained in:
		
							
								
								
									
										8
									
								
								status.c
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								status.c
									
									
									
									
									
								
							@@ -661,7 +661,7 @@ status_prompt_set(struct client *c, const char *msg, const char *input,
 | 
			
		||||
{
 | 
			
		||||
	struct format_tree	*ft;
 | 
			
		||||
	time_t			 t;
 | 
			
		||||
	char			*tmp;
 | 
			
		||||
	char			*tmp, *cp;
 | 
			
		||||
 | 
			
		||||
	ft = format_create(c, NULL, FORMAT_NONE, 0);
 | 
			
		||||
	format_defaults(ft, c, NULL, NULL, NULL);
 | 
			
		||||
@@ -690,6 +690,12 @@ status_prompt_set(struct client *c, const char *msg, const char *input,
 | 
			
		||||
		c->tty.flags |= (TTY_NOCURSOR|TTY_FREEZE);
 | 
			
		||||
	c->flags |= CLIENT_STATUS;
 | 
			
		||||
 | 
			
		||||
	if ((flags & PROMPT_INCREMENTAL) && *tmp != '\0') {
 | 
			
		||||
		xasprintf(&cp, "=%s", tmp);
 | 
			
		||||
		c->prompt_callbackfn(c->prompt_data, cp, 0);
 | 
			
		||||
		free(cp);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	free(tmp);
 | 
			
		||||
	format_free(ft);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user