Skip to content

Commit a0a19c2

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

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/file_revlog.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,10 @@ impl FileRevlogComponent {
240240
let commit_id = table_state.selected().and_then(|selected| {
241241
self.items
242242
.iter()
243-
.nth(selected.saturating_sub(table_state.offset()))
243+
.nth(
244+
selected
245+
.saturating_sub(self.items.index_offset()),
246+
)
244247
.as_ref()
245248
.map(|entry| entry.id)
246249
});

0 commit comments

Comments
 (0)