Fix regression where note-setting on newly stashed items couldn't be done

This commit is contained in:
Christian Rocha 2020-08-24 17:00:27 -04:00 committed by Christian Muehlhaeuser
commit 5515460f32
2 changed files with 3 additions and 2 deletions

View file

@ -423,7 +423,7 @@ func stashUpdate(msg tea.Msg, m stashModel) (stashModel, tea.Cmd) {
m.hideStatusMessage()
md := m.selectedMarkdown()
isUserMarkdown := md.markdownType == stashedMarkdown
isUserMarkdown := md.markdownType == stashedMarkdown || md.markdownType == convertedMarkdown
isSettingNote := m.state == stashStateSettingNote
isPromptingDelete := m.state == stashStatePromptDelete
@ -441,7 +441,7 @@ func stashUpdate(msg tea.Msg, m stashModel) (stashModel, tea.Cmd) {
break
}
// if we're busy stashing this don't do it again
// If we're busy stashing this don't do it again
_, exists := m.filesStashing[md.localPath]
if exists || (md.markdownType != localMarkdown) || md.localPath == "" {

View file

@ -598,6 +598,7 @@ func localFileToMarkdown(cwd string, res gitcha.SearchResult) *markdown {
return md
}
// Lightweight version of reflow's indent function.
func indent(s string, n int) string {
if n <= 0 || s == "" {
return s