mirror of
https://github.com/charmbracelet/glow
synced 2024-11-10 06:04:18 +00:00
Change help text if we've filtered down to one item
This commit is contained in:
parent
75528db9f1
commit
9797f225a7
1 changed files with 4 additions and 1 deletions
|
@ -938,9 +938,10 @@ func stashHelpView(m stashModel) string {
|
|||
h []string
|
||||
isStashed bool
|
||||
isLocal bool
|
||||
numDocs = len(m.getNotes())
|
||||
)
|
||||
|
||||
if len(m.getNotes()) > 0 {
|
||||
if numDocs > 0 {
|
||||
md := m.selectedMarkdown()
|
||||
isStashed = md != nil && md.markdownType == stashedMarkdown
|
||||
isLocal = md != nil && md.markdownType == localMarkdown
|
||||
|
@ -950,6 +951,8 @@ func stashHelpView(m stashModel) string {
|
|||
h = append(h, "enter: confirm", "esc: cancel")
|
||||
} else if m.state == stashStatePromptDelete {
|
||||
h = append(h, "y: delete", "n: cancel")
|
||||
} else if m.state == stashStateSearchNotes && numDocs == 1 {
|
||||
h = append(h, "enter: open", "esc: cancel")
|
||||
} else if m.state == stashStateSearchNotes {
|
||||
h = append(h, "enter: confirm", "esc: cancel", "ctrl+j/ctrl+k, ↑/↓: choose")
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue