Skip to content

Commit

Permalink
Merge pull request #531 from GRFreire/empty-metadata-negative-index
Browse files Browse the repository at this point in the history
Fix panic when scrolling through an empty metadata list
  • Loading branch information
yorukot authored Dec 30, 2024
2 parents 98a019f + bd1f831 commit c6370eb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/internal/handle_panel_movement.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,10 @@ func (m *model) controlMetadataListUp(wheel bool) {
runTime = wheelRunTime
}

if len(m.fileMetaData.metaData) == 0 {
return
}

for i := 0; i < runTime; i++ {
if m.fileMetaData.renderIndex > 0 {
m.fileMetaData.renderIndex--
Expand Down

0 comments on commit c6370eb

Please sign in to comment.