Skip to content

Commit e85f550

Browse files
committed
test: add tests for the picker
1 parent 016ef9b commit e85f550

File tree

2 files changed

+481
-4
lines changed

2 files changed

+481
-4
lines changed

internal/picker/picker.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,9 @@ func New(title string, items []string) Model {
8888
ti.TextStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("252"))
8989

9090
searchKeys := make([]string, len(items))
91+
filtered := make([]int, len(items))
9192
for i, item := range items {
9293
searchKeys[i] = extractSearchKey(item)
93-
}
94-
95-
filtered := make([]int, len(items))
96-
for i := range items {
9794
filtered[i] = i
9895
}
9996

0 commit comments

Comments
 (0)