diff options
author | Alexandru Placinta <placintaalexandru1@gmail.com> | 2024-02-11 23:53:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-11 22:53:57 +0000 |
commit | 5c4469ffa7727b7a8d82f3f8261613a30591b4de (patch) | |
tree | 7f39c75d4f4b5cc1ac29ce6e54b82776bfecde2b | |
parent | 117719b3216d60ddde4096d9b2bdccecfd214c42 (diff) | |
download | alacritty-5c4469ffa7727b7a8d82f3f8261613a30591b4de.tar.gz alacritty-5c4469ffa7727b7a8d82f3f8261613a30591b4de.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)] } } |