mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Two fixes by Micah Cowan: make mouse work properly beyond >127 on signed
char architectures and properly parse $TMUX by stopping the socket path at the first comma.
This commit is contained in:
		
							
								
								
									
										2
									
								
								tmux.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								tmux.c
									
									
									
									
									
								
							@@ -132,7 +132,7 @@ parseenvironment(void)
 | 
			
		||||
	if ((env = getenv("TMUX")) == NULL)
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	if (sscanf(env, "%255s,%ld,%d", path, &pid, &idx) != 3)
 | 
			
		||||
	if (sscanf(env, "%255[^,],%ld,%d", path, &pid, &idx) != 3)
 | 
			
		||||
		return;
 | 
			
		||||
	environ_path = xstrdup(path);
 | 
			
		||||
	environ_pid = pid;
 | 
			
		||||
 
 | 
			
		||||
@@ -630,10 +630,10 @@ tty_keys_mouse(struct tty *tty,
 | 
			
		||||
				utf8_append(&utf8data, buf[*size]);
 | 
			
		||||
				value = utf8_combine(&utf8data);
 | 
			
		||||
			} else
 | 
			
		||||
				value = buf[*size];
 | 
			
		||||
				value = (unsigned char)buf[*size];
 | 
			
		||||
			(*size)++;
 | 
			
		||||
		} else {
 | 
			
		||||
			value = buf[*size];
 | 
			
		||||
			value = (unsigned char)buf[*size];
 | 
			
		||||
			(*size)++;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user