mirror of
https://github.com/charmbracelet/glow
synced 2024-11-10 14:14:17 +00:00
Use the proper method for adding markdown docs to the stash
This commit is contained in:
parent
2581f7625f
commit
3d1adeec52
1 changed files with 2 additions and 6 deletions
|
@ -75,7 +75,7 @@ func (m markdownsByLocalFirst) Less(i, j int) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
// Both or neither are local files, so sort by date descending
|
||||
// Both or neither are local files so sort by date descending
|
||||
return m[i].CreatedAt.After(*m[j].CreatedAt)
|
||||
}
|
||||
|
||||
|
@ -211,11 +211,7 @@ func stashUpdate(msg tea.Msg, m stashModel) (stashModel, tea.Cmd) {
|
|||
// We've received a list of local markdowns
|
||||
case fileWalkFinishedMsg:
|
||||
if len(msg) > 0 {
|
||||
for _, v := range msg {
|
||||
if v != nil {
|
||||
m.markdowns = append(m.markdowns, v)
|
||||
}
|
||||
}
|
||||
m.addMarkdowns(msg...)
|
||||
}
|
||||
|
||||
// Stash results have come in from the server
|
||||
|
|
Loading…
Reference in a new issue