1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2025-02-17 15:57:08 -05:00

Fix row indexing with inclusive ranges

This commit is contained in:
Alexandru Placinta 2024-02-11 23:53:57 +01:00 committed by Christian Duerr
parent 0c45a9edba
commit 7d519f57fd

View file

@ -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)]
}
}