don't scroll past end
This commit is contained in:
parent
f3bc16b3c5
commit
01774cb9c2
1 changed files with 2 additions and 2 deletions
|
|
@ -198,8 +198,8 @@ impl LogViewer {
|
|||
res.push(i);
|
||||
}
|
||||
|
||||
if self.curr.selection_offset > res.len() {
|
||||
self.curr.selection_offset = res.len();
|
||||
if res.len() > 0 && self.curr.selection_offset > res.len() - 1 {
|
||||
self.curr.selection_offset = res.len() - 1;
|
||||
}
|
||||
|
||||
Some((res, self.curr.selection_offset))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue