mirror of
https://github.com/charmbracelet/glow.git
synced 2026-08-23 00:24:17 +02:00
Fix regression where note-setting on newly stashed items couldn't be done
This commit is contained in:
parent
82acc62783
commit
5515460f32
2 changed files with 3 additions and 2 deletions
|
|
@ -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 == "" {
|
||||
|
|
|
|||
1
ui/ui.go
1
ui/ui.go
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue