mirror of
https://github.com/charmbracelet/glow
synced 2024-11-10 14:14:17 +00:00
Fix bug where spinner would spin forever if the stash is empty
This commit is contained in:
parent
213df4ad7f
commit
e50aff65c2
1 changed files with 4 additions and 5 deletions
|
@ -189,15 +189,14 @@ func stashUpdate(msg tea.Msg, m stashModel) (stashModel, tea.Cmd) {
|
|||
case gotStashMsg:
|
||||
m.loading = false
|
||||
|
||||
// If the server comes back with nothing then we've got everything
|
||||
if len(msg) == 0 {
|
||||
// If the server comes back with nothing then we've got everything
|
||||
m.fullyLoaded = true
|
||||
break
|
||||
} else {
|
||||
docs := wrapMarkdowns(userMarkdown, msg)
|
||||
m.addMarkdowns(docs...)
|
||||
}
|
||||
|
||||
docs := wrapMarkdowns(userMarkdown, msg)
|
||||
m.addMarkdowns(docs...)
|
||||
|
||||
m.loaded |= loadedStash
|
||||
if m.loaded.done() {
|
||||
m.state = stashStateReady
|
||||
|
|
Loading…
Reference in a new issue