mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-11 13:51:01 -05:00
Fix corruption issue
Fixes an issue where input with the cursor at the bottom-right of the terminal would cause a crash.
This commit is contained in:
parent
e3c68fed87
commit
ad4d704ab3
1 changed files with 5 additions and 1 deletions
|
@ -405,7 +405,11 @@ impl ansi::Handler for Term {
|
||||||
debug_print!("{}", c);
|
debug_print!("{}", c);
|
||||||
if self.cursor.col == self.grid.num_cols() {
|
if self.cursor.col == self.grid.num_cols() {
|
||||||
debug_println!("wrapping");
|
debug_println!("wrapping");
|
||||||
|
if (self.cursor.line + 1) == self.grid.num_lines() {
|
||||||
|
self.linefeed();
|
||||||
|
} else {
|
||||||
self.cursor.line += 1;
|
self.cursor.line += 1;
|
||||||
|
}
|
||||||
self.cursor.col = Column(0);
|
self.cursor.col = Column(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue