mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-03 16:46:18 +00:00 
			
		
		
		
	CUB and CUF are also limited by the margins so use CUP instead when
margins are enabled (we already do this for linefeed).
This commit is contained in:
		
							
								
								
									
										8
									
								
								tty.c
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								tty.c
									
									
									
									
									
								
							@@ -2106,7 +2106,9 @@ tty_cursor(struct tty *tty, u_int cx, u_int cy)
 | 
			
		||||
		if ((u_int) abs(change) > cx && tty_term_has(term, TTYC_HPA)) {
 | 
			
		||||
			tty_putcode1(tty, TTYC_HPA, cx);
 | 
			
		||||
			goto out;
 | 
			
		||||
		} else if (change > 0 && tty_term_has(term, TTYC_CUB)) {
 | 
			
		||||
		} else if (change > 0 &&
 | 
			
		||||
		    tty_term_has(term, TTYC_CUB) &&
 | 
			
		||||
		    !tty_use_margin(tty)) {
 | 
			
		||||
			if (change == 2 && tty_term_has(term, TTYC_CUB1)) {
 | 
			
		||||
				tty_putcode(tty, TTYC_CUB1);
 | 
			
		||||
				tty_putcode(tty, TTYC_CUB1);
 | 
			
		||||
@@ -2114,7 +2116,9 @@ tty_cursor(struct tty *tty, u_int cx, u_int cy)
 | 
			
		||||
			}
 | 
			
		||||
			tty_putcode1(tty, TTYC_CUB, change);
 | 
			
		||||
			goto out;
 | 
			
		||||
		} else if (change < 0 && tty_term_has(term, TTYC_CUF)) {
 | 
			
		||||
		} else if (change < 0 &&
 | 
			
		||||
		    tty_term_has(term, TTYC_CUF) &&
 | 
			
		||||
		    !tty_use_margin(tty)) {
 | 
			
		||||
			tty_putcode1(tty, TTYC_CUF, -change);
 | 
			
		||||
			goto out;
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user