Skip to content

Commit 593d0ea

Browse files
committed
Fix hanging when opening a blacklist
1 parent d2baa5b commit 593d0ea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cli/commands.go

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ var commandConfigureBlacklist = command{
4444
Name: "blacklist",
4545
Desc: "Configure blacklist.",
4646
Run: func(m model) model {
47-
m.commandsListSelection = 0
4847
m.state = blacklistView
4948
m.textarea.SetValue(strings.Join(m.domains, "\n"))
5049
m.textarea.Focus()

cli/model.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func (m model) Init() tea.Cmd {
4949
return tea.Quit
5050
}
5151

52-
return nil
52+
return textarea.Blink
5353
}
5454

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

105+
m.commandsListSelection = 0
105106
m.domains = domains
106107
m.state = menuView
107108
m.textarea.Blur()

0 commit comments

Comments
 (0)