mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Send two cub1 instead of using cub for moving the cursor two left. This
is normally better because using cub1 will be ^H^H (so two bytes) but cub would be ^[[2D (four).
This commit is contained in:
		
							
								
								
									
										7
									
								
								tty.c
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								tty.c
									
									
									
									
									
								
							@@ -1345,7 +1345,7 @@ tty_cursor(struct tty *tty, u_int cx, u_int cy)
 | 
			
		||||
		 */
 | 
			
		||||
 | 
			
		||||
		/* To left edge. */
 | 
			
		||||
		if (cx == 0)	{
 | 
			
		||||
		if (cx == 0) {
 | 
			
		||||
			tty_putc(tty, '\r');
 | 
			
		||||
			goto out;
 | 
			
		||||
		}
 | 
			
		||||
@@ -1373,6 +1373,11 @@ tty_cursor(struct tty *tty, u_int cx, u_int cy)
 | 
			
		||||
			tty_putcode1(tty, TTYC_HPA, cx);
 | 
			
		||||
			goto out;
 | 
			
		||||
		} else if (change > 0 && tty_term_has(term, TTYC_CUB)) {
 | 
			
		||||
			if (change == 2 && tty_term_has(term, TTYC_CUB1)) {
 | 
			
		||||
				tty_putcode(tty, TTYC_CUB1);
 | 
			
		||||
				tty_putcode(tty, TTYC_CUB1);
 | 
			
		||||
				goto out;
 | 
			
		||||
			}
 | 
			
		||||
			tty_putcode1(tty, TTYC_CUB, change);
 | 
			
		||||
			goto out;
 | 
			
		||||
		} else if (change < 0 && tty_term_has(term, TTYC_CUF)) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user