mirror of
https://github.com/charmbracelet/glow.git
synced 2026-08-23 16:44:17 +02: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…
Add table
Add a link
Reference in a new issue