mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Fix rectangle copy to behave like emacs - the cursor is not part of the
selection on the right edge but on the left it is.
This commit is contained in:
		
							
								
								
									
										4
									
								
								screen.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								screen.c
									
									
									
									
									
								
							@@ -287,7 +287,7 @@ screen_check_selection(struct screen *s, u_int px, u_int py)
 | 
			
		||||
		 */
 | 
			
		||||
		if (sel->ex < sel->sx) {
 | 
			
		||||
			/* Cursor (ex) is on the left. */
 | 
			
		||||
			if (px <= sel->ex)
 | 
			
		||||
			if (px < sel->ex)
 | 
			
		||||
				return (0);
 | 
			
		||||
 | 
			
		||||
			if (px > sel->sx)
 | 
			
		||||
@@ -297,7 +297,7 @@ screen_check_selection(struct screen *s, u_int px, u_int py)
 | 
			
		||||
			if (px < sel->sx)
 | 
			
		||||
				return (0);
 | 
			
		||||
 | 
			
		||||
			if (px >= sel->ex)
 | 
			
		||||
			if (px > sel->ex)
 | 
			
		||||
				return (0);
 | 
			
		||||
		}
 | 
			
		||||
	} else {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user