mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-18 13:55:23 -05:00
Fix row indexing with inclusive ranges
This commit is contained in:
parent
117719b321
commit
5c4469ffa7
1 changed files with 1 additions and 1 deletions
|
@ -291,7 +291,7 @@ impl<T> Index<RangeToInclusive<Column>> for Row<T> {
|
||||||
impl<T> IndexMut<RangeToInclusive<Column>> for Row<T> {
|
impl<T> IndexMut<RangeToInclusive<Column>> for Row<T> {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn index_mut(&mut self, index: RangeToInclusive<Column>) -> &mut [T] {
|
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)]
|
&mut self.inner[..=(index.end.0)]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue