Skip to content

Commit

Permalink
Refactor code to copy preselect to choices in fzf.go
Browse files Browse the repository at this point in the history
  • Loading branch information
koki-develop committed Jul 28, 2023
1 parent d916253 commit f1b6700
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fzf.go
Expand Up @@ -73,9 +73,7 @@ func (fzf *FZF) Find(items interface{}, itemFunc func(i int) string, opts ...Fin
}
} else {
fzf.model.choices = make([]int, len(findOption.preselect))
for i, idx := range findOption.preselect {
fzf.model.choices[i] = idx
}
copy(fzf.model.choices, findOption.preselect)
}
}

Expand Down

0 comments on commit f1b6700

Please sign in to comment.