From 2e7b0ec60fae168c9bac3da11167785864f3e4ed Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Mon, 24 Aug 2020 15:14:47 -0400 Subject: [PATCH] Fix regression where items stashed in the pager were treated as local --- ui/pager.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/pager.go b/ui/pager.go index e28d2eb..797f0dc 100644 --- a/ui/pager.go +++ b/ui/pager.go @@ -215,8 +215,11 @@ func pagerUpdate(msg tea.Msg, m pagerModel) (pagerModel, tea.Cmd) { return m, nil } case "m": + isStashed := m.currentDocument.markdownType == stashedMarkdown || + m.currentDocument.markdownType == convertedMarkdown + // Users can only set the note on user-stashed markdown - if m.currentDocument.markdownType != stashedMarkdown { + if !isStashed { break } @@ -338,7 +341,7 @@ func pagerView(m pagerModel) string { func pagerStatusBarView(b *strings.Builder, m pagerModel) { var ( - isStashed bool = m.currentDocument.markdownType == stashedMarkdown + isStashed bool = m.currentDocument.markdownType == stashedMarkdown || m.currentDocument.markdownType == convertedMarkdown showStatusMessage bool = m.state == pagerStateStatusMessage )