aboutsummaryrefslogtreecommitdiff
path: root/src/display.rs
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/display.rs
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/display.rs')
-rw-r--r--src/display.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/display.rs b/src/display.rs
index 58c58e3a..25c4855a 100644
--- a/src/display.rs
+++ b/src/display.rs
@@ -415,7 +415,7 @@ impl Display {
pty_size.height -= pty_size.cell_height * message.text(&size).len() as f32;
}
- if previous_cols != size.cols() || previous_lines != size.lines() {
+ if previous_cols != size.cols() || previous_lines != size.lines() {
pty_resize_handle.on_resize(&pty_size);
}
@@ -489,7 +489,7 @@ impl Display {
// Iterate over all non-empty cells in the grid
for cell in grid_cells {
// Update underline/strikeout
- rects.update_lines(&cell);
+ rects.update_lines(&size_info, &cell);
// Draw the cell
api.render_cell(cell, glyph_cache);