mirror of
https://github.com/alacritty/alacritty
synced 2024-09-30 04:53:41 +00:00
Fix row indexing with inclusive ranges
This commit is contained in:
parent
117719b321
commit
5c4469ffa7
|
@ -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)]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue