From 477979bce96b1f2fa8d1d2785d96bddcd2c45d04 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Sun, 18 Oct 2020 22:12:08 -0400 Subject: [PATCH] Correct placement of stash hint in pager help --- ui/pager.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ui/pager.go b/ui/pager.go index e11866e..71e1d1b 100644 --- a/ui/pager.go +++ b/ui/pager.go @@ -469,17 +469,19 @@ func pagerSetNoteView(b *strings.Builder, m pagerModel) { } func pagerHelpView(m pagerModel, width int) (s string) { + memoOrStash := "m set memo" + if m.authStatus == authOK && m.currentDocument.markdownType != stashedMarkdown { + memoOrStash = "s stash this document" + } + col1 := [...]string{ "g/home go to top", "G/end go to bottom", "", - "m set memo", + memoOrStash, "esc back to files", "q quit", } - if m.authStatus == authOK && m.currentDocument.markdownType != stashedMarkdown { - col1[5] = "s stash this document" - } s += "\n" s += "k/↑ up " + col1[0] + "\n"