mirror of
https://github.com/charmbracelet/glow.git
synced 2026-08-20 23:24:18 +02:00
fix(ui): model init signature
This commit is contained in:
parent
8a3df5fd64
commit
cfc1b9ba87
1 changed files with 3 additions and 3 deletions
6
ui/ui.go
6
ui/ui.go
|
|
@ -148,10 +148,10 @@ func newModel(cfg Config) tea.Model {
|
|||
}
|
||||
}
|
||||
|
||||
func (m model) Init() (tea.Model, tea.Cmd) {
|
||||
func (m model) Init() tea.Cmd {
|
||||
cmds := []tea.Cmd{m.stash.spinner.Tick}
|
||||
cmds = append(cmds, findLocalFiles(*m.common))
|
||||
return m, tea.Batch(cmds...)
|
||||
return tea.Batch(cmds...)
|
||||
}
|
||||
|
||||
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
|
|
@ -175,7 +175,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||
case "r":
|
||||
if m.state == stateShowStash {
|
||||
m.stash.markdowns = nil
|
||||
return m.Init()
|
||||
return m, m.Init()
|
||||
}
|
||||
|
||||
case "q":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue