mirror of
https://github.com/charmbracelet/glow
synced 2024-11-10 06:04:18 +00: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…
Reference in a new issue