mirror of
https://github.com/charmbracelet/glow.git
synced 2026-08-20 15:14:17 +02:00
Fix panic that could happen when deleting stuff really fast
This commit is contained in:
parent
03d93169f2
commit
426f4787e5
1 changed files with 6 additions and 1 deletions
|
|
@ -759,7 +759,12 @@ func (m *stashModel) handleDocumentBrowsing(msg tea.Msg) tea.Cmd {
|
|||
break
|
||||
}
|
||||
|
||||
t := m.selectedMarkdown().markdownType
|
||||
md := m.selectedMarkdown()
|
||||
if md == nil {
|
||||
break
|
||||
}
|
||||
|
||||
t := md.markdownType
|
||||
if t == StashedDoc || t == ConvertedDoc {
|
||||
m.selectionState = selectionPromptingDelete
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue