1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2025-10-30 23:36:53 -04:00

Fix colored row reset performance

This fixes a bug where a row would always get reset completely if its
background does not equal the default terminal background. This leads to
big performance bottlenecks when running commands like `echo "\e[41m" &&
yes`.

Instead of resetting the entire row whenever the template cell is not
empty, the template cell is now compared to the last cell in the row.
The last cell will always be equal to the previous template cell when
`row.occ < row.inner.len()` and if `occ` is equal to the row's length,
the entire row is always reset anyways.

Fixes #2989.
This commit is contained in:
Christian Duerr 2019-12-10 00:35:13 +01:00 committed by GitHub
parent 79b19176ee
commit 36185c4753
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 73 additions and 40 deletions

File diff suppressed because one or more lines are too long