aboutsummaryrefslogtreecommitdiff
path: root/src/term
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2019-04-19 12:07:56 +0000
committerGitHub <noreply@github.com>2019-04-19 12:07:56 +0000
commit6716c81c08c10477d2370d7e1ca56e31348a7fa3 (patch)
treebd35a36361e9c65423a30ce1c0ea37386ee3a3d7 /src/term
parentbadc41e1d02eb0ed22520eda529b254216b9a2fc (diff)
downloadalacritty-6716c81c08c10477d2370d7e1ca56e31348a7fa3.tar.gz
alacritty-6716c81c08c10477d2370d7e1ca56e31348a7fa3.zip
Fix update_lines performance issues
This resolves performance issues with the `update_lines` method that were caused by excessive updates without underlines or strikeout present. This also resolves a bug that was causing the underline and strikeout to extend beyond the end of line in some rare cases. This fixes #114.
Diffstat (limited to 'src/term')
-rw-r--r--src/term/mod.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/term/mod.rs b/src/term/mod.rs
index 3178de4c..48eedef1 100644
--- a/src/term/mod.rs
+++ b/src/term/mod.rs
@@ -1318,7 +1318,9 @@ impl Term {
lines = min(lines, self.scroll_region.end - origin);
// Scroll between origin and bottom
- self.grid.scroll_down(&(origin..self.scroll_region.end), lines, &self.cursor.template);
+ let mut template = self.cursor.template;
+ template.flags = Flags::empty();
+ self.grid.scroll_down(&(origin..self.scroll_region.end), lines, &template);
}
/// Scroll screen up
@@ -1331,7 +1333,9 @@ impl Term {
let lines = min(lines, self.scroll_region.end - self.scroll_region.start);
// Scroll from origin to bottom less number of lines
- self.grid.scroll_up(&(origin..self.scroll_region.end), lines, &self.cursor.template);
+ let mut template = self.cursor.template;
+ template.flags = Flags::empty();
+ self.grid.scroll_up(&(origin..self.scroll_region.end), lines, &template);
}
fn deccolm(&mut self) {