From 6965caf3af80ce5d620445daa9f40667a5324b7c Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Tue, 10 Nov 2020 16:53:17 -0500 Subject: [PATCH] When stashing/unstashing an item during filtering maintain its position --- ui/stash.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ui/stash.go b/ui/stash.go index 011e102..bab9656 100644 --- a/ui/stash.go +++ b/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)