mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Merge branch 'obsd-master'
Conflicts: Makefile.am cfg.c server-client.c
This commit is contained in:
		
							
								
								
									
										20
									
								
								tty-term.c
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								tty-term.c
									
									
									
									
									
								
							@@ -245,6 +245,8 @@ static const struct tty_term_code_entry tty_term_codes[] = {
 | 
			
		||||
	[TTYC_SE] = { TTYCODE_STRING, "Se" },
 | 
			
		||||
	[TTYC_SETAB] = { TTYCODE_STRING, "setab" },
 | 
			
		||||
	[TTYC_SETAF] = { TTYCODE_STRING, "setaf" },
 | 
			
		||||
	[TTYC_SETRGBB] = { TTYCODE_STRING, "setrgbb" },
 | 
			
		||||
	[TTYC_SETRGBF] = { TTYCODE_STRING, "setrgbf" },
 | 
			
		||||
	[TTYC_SGR0] = { TTYCODE_STRING, "sgr0" },
 | 
			
		||||
	[TTYC_SITM] = { TTYCODE_STRING, "sitm" },
 | 
			
		||||
	[TTYC_SMACS] = { TTYCODE_STRING, "smacs" },
 | 
			
		||||
@@ -527,6 +529,18 @@ tty_term_find(char *name, int fd, char **cause)
 | 
			
		||||
		code->type = TTYCODE_STRING;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/* On terminals with RGB colour (TC), fill in setrgbf and setrgbb. */
 | 
			
		||||
	if (tty_term_flag(term, TTYC_TC) &&
 | 
			
		||||
	    !tty_term_has(term, TTYC_SETRGBF) &&
 | 
			
		||||
	    !tty_term_has(term, TTYC_SETRGBB)) {
 | 
			
		||||
		code = &term->codes[TTYC_SETRGBF];
 | 
			
		||||
		code->value.string = xstrdup("\033[38;2;%p1%d;%p2%d;%p3%dm");
 | 
			
		||||
		code->type = TTYCODE_STRING;
 | 
			
		||||
		code = &term->codes[TTYC_SETRGBB];
 | 
			
		||||
		code->value.string = xstrdup("\033[48;2;%p1%d;%p2%d;%p3%dm");
 | 
			
		||||
		code->type = TTYCODE_STRING;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return (term);
 | 
			
		||||
 | 
			
		||||
error:
 | 
			
		||||
@@ -582,6 +596,12 @@ tty_term_string2(struct tty_term *term, enum tty_code_code code, int a, int b)
 | 
			
		||||
	return (tparm((char *) tty_term_string(term, code), a, b, 0, 0, 0, 0, 0, 0, 0));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const char *
 | 
			
		||||
tty_term_string3(struct tty_term *term, enum tty_code_code code, int a, int b, int c)
 | 
			
		||||
{
 | 
			
		||||
	return (tparm((char *) tty_term_string(term, code), a, b, c));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const char *
 | 
			
		||||
tty_term_ptr1(struct tty_term *term, enum tty_code_code code, const void *a)
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user