Skip to content

Commit 87007c9

Browse files
committed
Subtract correct offset
1 parent c5867e2 commit 87007c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/file_revlog.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ impl FileRevlogComponent {
418418
// yields the correct index in `self.items`, in this case 0.
419419
let mut adjusted_table_state = TableState::default()
420420
.with_selected(table_state.selected().map(|selected| {
421-
selected.saturating_sub(table_state.offset())
421+
selected.saturating_sub(self.items.index_offset())
422422
}))
423423
.with_offset(0);
424424

0 commit comments

Comments
 (0)