mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	There are buggy terminals out there that do not move the cursor to 0,0
after CSR, so invalidate the cursor position rather than assuming 0,0.
This commit is contained in:
		
							
								
								
									
										2
									
								
								input.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								input.c
									
									
									
									
									
								
							@@ -1389,7 +1389,7 @@ input_csi_dispatch(struct input_ctx *ictx)
 | 
				
			|||||||
		break;
 | 
							break;
 | 
				
			||||||
	case INPUT_CSI_IL:
 | 
						case INPUT_CSI_IL:
 | 
				
			||||||
		screen_write_insertline(sctx, input_get(ictx, 0, 1, 1),
 | 
							screen_write_insertline(sctx, input_get(ictx, 0, 1, 1),
 | 
				
			||||||
			ictx->cell.cell.bg);
 | 
							    ictx->cell.cell.bg);
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
	case INPUT_CSI_RCP:
 | 
						case INPUT_CSI_RCP:
 | 
				
			||||||
		memcpy(&ictx->cell, &ictx->old_cell, sizeof ictx->cell);
 | 
							memcpy(&ictx->cell, &ictx->old_cell, sizeof ictx->cell);
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										4
									
								
								tty.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								tty.c
									
									
									
									
									
								
							@@ -1321,7 +1321,7 @@ tty_region(struct tty *tty, u_int rupper, u_int rlower)
 | 
				
			|||||||
		tty_cursor(tty, 0, tty->cy);
 | 
							tty_cursor(tty, 0, tty->cy);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	tty_putcode2(tty, TTYC_CSR, tty->rupper, tty->rlower);
 | 
						tty_putcode2(tty, TTYC_CSR, tty->rupper, tty->rlower);
 | 
				
			||||||
	tty->cx = tty->cy = 0;
 | 
						tty->cx = tty->cy = UINT_MAX;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Turn off margin. */
 | 
					/* Turn off margin. */
 | 
				
			||||||
@@ -1359,7 +1359,7 @@ tty_margin(struct tty *tty, u_int rleft, u_int rright)
 | 
				
			|||||||
	else
 | 
						else
 | 
				
			||||||
		snprintf(s, sizeof s, "\033[%u;%us", rleft + 1, rright + 1);
 | 
							snprintf(s, sizeof s, "\033[%u;%us", rleft + 1, rright + 1);
 | 
				
			||||||
	tty_puts(tty, s);
 | 
						tty_puts(tty, s);
 | 
				
			||||||
	tty->cx = tty->cy = 0;
 | 
						tty->cx = tty->cy = UINT_MAX;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Move cursor inside pane. */
 | 
					/* Move cursor inside pane. */
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user