mirror of
https://github.com/charmbracelet/glow
synced 2024-11-10 06:04:18 +00:00
Keep displaying local markdowns after stashing & deleting them
This commit is contained in:
parent
8d03dd5731
commit
5e27376af4
1 changed files with 4 additions and 3 deletions
|
@ -636,10 +636,11 @@ func stashUpdate(msg tea.Msg, m stashModel) (stashModel, tea.Cmd) {
|
||||||
// back to a local file.
|
// back to a local file.
|
||||||
md.markdownType = localMarkdown
|
md.markdownType = localMarkdown
|
||||||
md.Note = m.markdowns[i].displayPath
|
md.Note = m.markdowns[i].displayPath
|
||||||
|
} else {
|
||||||
|
// Delete optimistically and remove the stashed item
|
||||||
|
// before we've received a success response.
|
||||||
|
m.markdowns = append(m.markdowns[:i], m.markdowns[i+1:]...)
|
||||||
}
|
}
|
||||||
// Delete optimistically and remove the stashed item
|
|
||||||
// before we've received a success response.
|
|
||||||
m.markdowns = append(m.markdowns[:i], m.markdowns[i+1:]...)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set state and delete
|
// Set state and delete
|
||||||
|
|
Loading…
Reference in a new issue