mirror of
https://github.com/charmbracelet/glow.git
synced 2026-08-23 08:34:17 +02: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…
Add table
Add a link
Reference in a new issue