diff options
author | Alexandru Placinta <placintaalexandru1@gmail.com> | 2024-02-11 23:53:57 +0100 |
---|---|---|
committer | Christian Duerr <contact@christianduerr.com> | 2024-03-19 02:20:53 +0100 |
commit | 7d519f57fdb3802eebabb7c264f2b3aa340ea3d0 (patch) | |
tree | 0876d686d8f2c68e7c6284bb8acf744c1cefbdb6 | |
parent | 0c45a9edba233968d91bfe5648b4664722442d9a (diff) | |
download | alacritty-7d519f57fdb3802eebabb7c264f2b3aa340ea3d0.tar.gz alacritty-7d519f57fdb3802eebabb7c264f2b3aa340ea3d0.zip |
Fix row indexing with inclusive ranges
-rw-r--r-- | alacritty_terminal/src/grid/row.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/alacritty_terminal/src/grid/row.rs b/alacritty_terminal/src/grid/row.rs index 951ef093..4e22e50b 100644 --- a/alacritty_terminal/src/grid/row.rs +++ b/alacritty_terminal/src/grid/row.rs @@ -291,7 +291,7 @@ impl<T> Index<RangeToInclusive<Column>> for Row<T> { impl<T> IndexMut<RangeToInclusive<Column>> for Row<T> { #[inline] fn index_mut(&mut self, index: RangeToInclusive<Column>) -> &mut [T] { - self.occ = max(self.occ, *index.end); + self.occ = max(self.occ, *index.end + 1); &mut self.inner[..=(index.end.0)] } } |