Skip to content

Commit

Permalink
Reset filter when template was chosen
Browse files Browse the repository at this point in the history
  • Loading branch information
ntk148v committed Nov 11, 2022
1 parent b58c690 commit 34d63d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ func newItemDelegate(keys *delegateKeyMap) list.DefaultDelegate {
case tea.KeyMsg:
switch {
case key.Matches(msg, keys.choose):
// Reset filter when template was chosen.
defer m.ResetFilter()
// Copy .gitignore template
pwd, _ := os.Getwd()
if err := copyTemplate(path, filepath.Join(pwd, ".gitignore")); err != nil {
Expand Down

0 comments on commit 34d63d1

Please sign in to comment.