Skip to content

Commit

Permalink
Fix hanging when opening a blacklist
Browse files Browse the repository at this point in the history
  • Loading branch information
plutov committed Jul 23, 2024
1 parent d2baa5b commit 593d0ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion cli/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ var commandConfigureBlacklist = command{
Name: "blacklist",
Desc: "Configure blacklist.",
Run: func(m model) model {
m.commandsListSelection = 0
m.state = blacklistView
m.textarea.SetValue(strings.Join(m.domains, "\n"))
m.textarea.Focus()
Expand Down
3 changes: 2 additions & 1 deletion cli/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (m model) Init() tea.Cmd {
return tea.Quit
}

return nil
return textarea.Blink
}

func (m *model) getCommmandsList() []command {
Expand Down Expand Up @@ -102,6 +102,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
return m, tea.Quit
}

m.commandsListSelection = 0
m.domains = domains
m.state = menuView
m.textarea.Blur()
Expand Down

0 comments on commit 593d0ea

Please sign in to comment.