From 356cd57c0e856cd22228834e3208f5003434235f Mon Sep 17 00:00:00 2001 From: Nicolas Martin Date: Wed, 4 Nov 2020 18:15:03 +0100 Subject: [PATCH] Only dim items when starting a new search --- ui/stashitem.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/stashitem.go b/ui/stashitem.go index 39f6400..cb2af90 100644 --- a/ui/stashitem.go +++ b/ui/stashitem.go @@ -93,7 +93,7 @@ func stashItemView(b *strings.Builder, m stashModel, index int, md *markdown) { title = textinput.View(m.noteInput) date = dullYellowFg(date) case stashStateSearchNotes: - if len(m.getNotes()) != 1 { + if len(m.getNotes()) != 1 && m.searchInput.Value() == "" { gutter = dimDullFuchsiaFg(verticalLine) icon = dimDullFuchsiaFg(icon) title = dimFuchsiaFg(title) @@ -114,14 +114,14 @@ func stashItemView(b *strings.Builder, m stashModel, index int, md *markdown) { if md.markdownType == newsMarkdown { gutter = " " - if m.state == stashStateSearchNotes { + if m.state == stashStateSearchNotes && m.searchInput.Value() == "" { title = dimIndigoFg(title) date = dimSubtleIndigoFg(date) } else { title = indigoFg(title) date = subtleIndigoFg(date) } - } else if m.state == stashStateSearchNotes { + } else if m.state == stashStateSearchNotes && m.searchInput.Value() == "" { icon = dimGreenFg(icon) if title == noMemoTitle { title = dimWarmGrayFg(title)