Skip to content

Commit

Permalink
Fix line indicator damage computation
Browse files Browse the repository at this point in the history
The starting point of damage should be computed from the right side
of the terminal, not from the starting point of line indicator.
  • Loading branch information
kchibisov authored Mar 10, 2022
1 parent dbccd7e commit a69c3c4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions alacritty/src/display/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -869,8 +869,9 @@ impl Display {

// Damage the maximum possible length of the format text, which could be achieved when
// using `MAX_SCROLLBACK_LINES` as current and total lines adding a `3` for formatting.
const MAX_LEN: usize = num_digits(MAX_SCROLLBACK_LINES) + 3;
self.damage_from_point(Point::new(0, point.column - MAX_LEN), MAX_LEN as u32 * 2);
const MAX_SIZE: usize = 2 * num_digits(MAX_SCROLLBACK_LINES) + 3;
let damage_point = Point::new(0, Column(size_info.columns().saturating_sub(MAX_SIZE)));
self.damage_from_point(damage_point, MAX_SIZE as u32);

let colors = &config.colors;
let fg = colors.line_indicator.foreground.unwrap_or(colors.primary.background);
Expand Down

0 comments on commit a69c3c4

Please sign in to comment.