Skip to content

Commit 8465c3f

Browse files
committed
🐛 fix: clamp max depending on phase
1 parent 40f8077 commit 8465c3f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/popups/conventional_commit.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,12 @@ impl ConventionalCommitPopup {
515515

516516
let new_selection = new_selection.clamp(
517517
0,
518-
self.query_results_type.len().saturating_sub(1),
518+
if self.seleted_commit_type.is_some() {
519+
self.query_results_more_info.len()
520+
} else {
521+
self.query_results_type.len()
522+
}
523+
.saturating_sub(1),
519524
);
520525

521526
self.selected_index = new_selection;

0 commit comments

Comments
 (0)