summaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/term/mod.rs
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2020-07-01 06:58:06 +0000
committerGitHub <noreply@github.com>2020-07-01 09:58:06 +0300
commitbc60782e424359d818a22ffa2ffa3c2dc88ab6fe (patch)
tree3fb6548a20e8c61badefd4aa91396c4eecce6c4d /alacritty_terminal/src/term/mod.rs
parent8688e47ddb932818d4e0992299c3cbbff6cf0572 (diff)
downloadalacritty-bc60782e424359d818a22ffa2ffa3c2dc88ab6fe.tar.gz
alacritty-bc60782e424359d818a22ffa2ffa3c2dc88ab6fe.zip
Fix reflow of empty wrapped cursor line
This bug was caused by trying to grow the terminal while the cursor line was wrapped but entirely empty. Resizing the terminal now accounts for the position of the deleted line and moves the cursor up only when the line deleted was above it. The deletion of the line was caused by the shell redrawing itself whenever the cursor is moved. Fixes #3583.
Diffstat (limited to 'alacritty_terminal/src/term/mod.rs')
-rw-r--r--alacritty_terminal/src/term/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/alacritty_terminal/src/term/mod.rs b/alacritty_terminal/src/term/mod.rs
index bed3f1bc..16e4de92 100644
--- a/alacritty_terminal/src/term/mod.rs
+++ b/alacritty_terminal/src/term/mod.rs
@@ -1775,7 +1775,7 @@ impl<T: EventListener> Handler for Term<T> {
},
}
- let cursor_buffer_line = self.grid.cursor_buffer_point().line;
+ let cursor_buffer_line = (self.grid.num_lines() - self.grid.cursor.point.line - 1).0;
self.selection = self
.selection
.take()
@@ -1858,7 +1858,7 @@ impl<T: EventListener> Handler for Term<T> {
let template = self.grid.cursor.template;
let num_lines = self.grid.num_lines().0;
- let cursor_buffer_line = self.grid.cursor_buffer_point().line;
+ let cursor_buffer_line = num_lines - self.grid.cursor.point.line.0 - 1;
match mode {
ansi::ClearMode::Above => {