mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Fix checking of setupterm(3) error codes. While there include the
name of the terminal type causing the error where relevant. ok nicm@.
This commit is contained in:
		
							
								
								
									
										10
									
								
								tty-term.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								tty-term.c
									
									
									
									
									
								
							@@ -186,13 +186,13 @@ tty_term_find(char *name, int fd, char **cause)
 | 
			
		||||
	/* Set up curses terminal. */
 | 
			
		||||
	if (setupterm(name, fd, &error) != OK) {
 | 
			
		||||
		switch (error) {
 | 
			
		||||
		case 0:
 | 
			
		||||
			xasprintf(cause, "can't use hardcopy terminal");
 | 
			
		||||
			break;
 | 
			
		||||
		case 1:
 | 
			
		||||
			xasprintf(cause, "missing or unsuitable terminal");
 | 
			
		||||
			xasprintf(cause, "can't use hardcopy terminal: %s", name);
 | 
			
		||||
			break;
 | 
			
		||||
		case 2:
 | 
			
		||||
		case 0:
 | 
			
		||||
			xasprintf(cause, "missing or unsuitable terminal: %s", name);
 | 
			
		||||
			break;
 | 
			
		||||
		case -1:
 | 
			
		||||
			xasprintf(cause, "can't find terminfo database");
 | 
			
		||||
			break;
 | 
			
		||||
		default:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user