mirror of
https://github.com/charmbracelet/glow
synced 2024-11-10 06:04:18 +00:00
When stashing/unstashing an item during filtering maintain its position
This commit is contained in:
parent
d717b7e330
commit
6965caf3af
1 changed files with 7 additions and 5 deletions
12
ui/stash.go
12
ui/stash.go
|
@ -232,15 +232,17 @@ func (m *stashModel) getNotes() []*markdown {
|
|||
targets := []string{}
|
||||
|
||||
for _, t := range m.markdowns {
|
||||
prefix := ""
|
||||
note := ""
|
||||
switch t.markdownType {
|
||||
case newsMarkdown:
|
||||
prefix = "News: "
|
||||
case convertedMarkdown:
|
||||
prefix = t.localPath
|
||||
note = "News: " + t.Note
|
||||
case stashedMarkdown:
|
||||
note = t.Note
|
||||
default:
|
||||
note = t.localPath
|
||||
}
|
||||
|
||||
targets = append(targets, prefix+t.Note)
|
||||
targets = append(targets, note)
|
||||
}
|
||||
|
||||
ranks := fuzzy.RankFindFold(m.searchInput.Value(), targets)
|
||||
|
|
Loading…
Reference in a new issue