From dd9179a9ae323e220da469bef61bcf79ff6a976d Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Wed, 25 Nov 2020 21:36:29 -0500 Subject: [PATCH] Remove "News:" prefix from news items --- ui/markdown.go | 5 ----- ui/stashitem.go | 3 +-- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/ui/markdown.go b/ui/markdown.go index c108b2a..91679b4 100644 --- a/ui/markdown.go +++ b/ui/markdown.go @@ -47,11 +47,6 @@ func (m *markdown) buildFilterValue() { m.filterValue = m.Note } - if m.markdownType == NewsDocument { - m.filterValue = "News: " + note - return - } - m.filterValue = note } diff --git a/ui/stashitem.go b/ui/stashitem.go index 4cd265d..24325d1 100644 --- a/ui/stashitem.go +++ b/ui/stashitem.go @@ -12,7 +12,6 @@ import ( ) const ( - newsPrefix = "News: " verticalLine = "│" noMemoTitle = "No Memo" fileListingStashIcon = "• " @@ -32,7 +31,7 @@ func stashItemView(b *strings.Builder, m stashModel, index int, md *markdown) { if title == "" { title = "News" } else { - title = newsPrefix + truncate(title, truncateTo-rw.StringWidth(newsPrefix)) + title = truncate(title, truncateTo) } case StashedDocument, ConvertedDocument: icon = fileListingStashIcon