mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Make set-clipboard a three-state option so tmux itself can ignore the
sequencess.
This commit is contained in:
		
							
								
								
									
										15
									
								
								input.c
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								input.c
									
									
									
									
									
								
							@@ -2103,9 +2103,13 @@ input_osc_52(struct window_pane *wp, const char *p)
 | 
			
		||||
	char			*end;
 | 
			
		||||
	size_t			 len;
 | 
			
		||||
	u_char			*out;
 | 
			
		||||
	int			 outlen;
 | 
			
		||||
	int			 outlen, state;
 | 
			
		||||
	struct screen_write_ctx	 ctx;
 | 
			
		||||
 | 
			
		||||
	state = options_get_number(global_options, "set-clipboard");
 | 
			
		||||
	if (state != 2)
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	if ((end = strchr(p, ';')) == NULL)
 | 
			
		||||
		return;
 | 
			
		||||
	end++;
 | 
			
		||||
@@ -2122,11 +2126,10 @@ input_osc_52(struct window_pane *wp, const char *p)
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (options_get_number(global_options, "set-clipboard")) {
 | 
			
		||||
		screen_write_start(&ctx, wp, NULL);
 | 
			
		||||
		screen_write_setselection(&ctx, out, outlen);
 | 
			
		||||
		screen_write_stop(&ctx);
 | 
			
		||||
	}
 | 
			
		||||
	screen_write_start(&ctx, wp, NULL);
 | 
			
		||||
	screen_write_setselection(&ctx, out, outlen);
 | 
			
		||||
	screen_write_stop(&ctx);
 | 
			
		||||
 | 
			
		||||
	paste_add(out, outlen);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user