mirror of
https://github.com/charmbracelet/glow.git
synced 2026-08-20 15:14:17 +02:00
Take note internally when the local file search is finished
This commit is contained in:
parent
ee058c4816
commit
cb8f7fcd19
1 changed files with 6 additions and 0 deletions
|
|
@ -103,6 +103,7 @@ func (s stashLoadedState) done() bool {
|
|||
const (
|
||||
loadedStash stashLoadedState = 1 << iota
|
||||
loadedNews
|
||||
loadedLocalFiles
|
||||
)
|
||||
|
||||
type stashModel struct {
|
||||
|
|
@ -232,6 +233,10 @@ func stashUpdate(msg tea.Msg, m stashModel) (stashModel, tea.Cmd) {
|
|||
}
|
||||
cmds = append(cmds, findNextLocalFile(m))
|
||||
|
||||
// We're finished searching for local files
|
||||
case localFileSearchFinished:
|
||||
m.loaded |= loadedLocalFiles
|
||||
|
||||
// Stash results have come in from the server
|
||||
case gotStashMsg:
|
||||
m.loading = false
|
||||
|
|
@ -249,6 +254,7 @@ func stashUpdate(msg tea.Msg, m stashModel) (stashModel, tea.Cmd) {
|
|||
m.state = stashStateReady
|
||||
}
|
||||
|
||||
// News has come in from the server
|
||||
case gotNewsMsg:
|
||||
if len(msg) > 0 {
|
||||
docs := wrapMarkdowns(newsMarkdown, msg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue