mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Currently the DCS dispatcher detects Sixel sequences based entirely on the
final character of the sequence, ignoring any intermediates. This means that other DCS sequences with a q final (like DECRQSS), can be mistakenly interpreted as Sixel. Add a check to make sure there are no intermediates before dispatching potential Sixel sequences. From James Holderness in GitHub issue 4488.
This commit is contained in:
		
							
								
								
									
										2
									
								
								input.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								input.c
									
									
									
									
									
								
							@@ -2384,7 +2384,7 @@ input_dcs_dispatch(struct input_ctx *ictx)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#ifdef ENABLE_SIXEL
 | 
					#ifdef ENABLE_SIXEL
 | 
				
			||||||
	w = wp->window;
 | 
						w = wp->window;
 | 
				
			||||||
	if (buf[0] == 'q') {
 | 
						if (buf[0] == 'q' && ictx->interm_len == 0) {
 | 
				
			||||||
		if (input_split(ictx) != 0)
 | 
							if (input_split(ictx) != 0)
 | 
				
			||||||
			return (0);
 | 
								return (0);
 | 
				
			||||||
		p2 = input_get(ictx, 1, 0, 0);
 | 
							p2 = input_get(ictx, 1, 0, 0);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user