summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2016-06-15 20:14:49 +0200
committerFabian Groffen <grobian@gentoo.org>2016-06-15 20:14:49 +0200
commitb4c8f87dcc9137396cd30ca1a079ee7ec99e1129 (patch)
treecfab2e0f59ccb739ecee624cf4e66c1d8e8286c3 /mail-client/mutt
parentkde-apps/kcalc: remove doxygen references (diff)
downloadgentoo-b4c8f87dcc9137396cd30ca1a079ee7ec99e1129.tar.gz
gentoo-b4c8f87dcc9137396cd30ca1a079ee7ec99e1129.tar.bz2
gentoo-b4c8f87dcc9137396cd30ca1a079ee7ec99e1129.zip
mail-client/mutt: add patch to fix drawing glitch in index view
Package-Manager: portage-2.2.28-prefix
Diffstat (limited to 'mail-client/mutt')
-rw-r--r--mail-client/mutt/files/mutt-1.6.1-neomutt-index_format_truncation_problem.patch32
-rw-r--r--mail-client/mutt/mutt-1.6.1-r2.ebuild1
2 files changed, 33 insertions, 0 deletions
diff --git a/mail-client/mutt/files/mutt-1.6.1-neomutt-index_format_truncation_problem.patch b/mail-client/mutt/files/mutt-1.6.1-neomutt-index_format_truncation_problem.patch
new file mode 100644
index 000000000000..3798b35f1221
--- /dev/null
+++ b/mail-client/mutt/files/mutt-1.6.1-neomutt-index_format_truncation_problem.patch
@@ -0,0 +1,32 @@
+From 099af5ae3e21bdceb3baf871e4b0a8926205e707 Mon Sep 17 00:00:00 2001
+From: Richard Russon <rich@flatcap.org>
+Date: Wed, 15 Jun 2016 16:47:22 +0100
+Subject: [PATCH] fix index_format truncation problem
+
+mutt_wstr_trunc() didn't take index coloring into account when measuring a
+string's length. When combined with a soft-fill '%* ' in the index_format it
+lead to formatting problems.
+
+Fixes: #51
+---
+ curs_lib.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/curs_lib.c b/curs_lib.c
+index ce4e56d..9a3f5e5 100644
+--- a/curs_lib.c
++++ b/curs_lib.c
+@@ -1201,7 +1201,12 @@ size_t mutt_wstr_trunc (const char *src, size_t maxlen, size_t maxwid, size_t *w
+ cw = wcwidth (wc);
+ /* hack because MUTT_TREE symbols aren't turned into characters
+ * until rendered by print_enriched_string (#3364) */
+- if (cw < 0 && cl == 1 && src[0] && src[0] < MUTT_TREE_MAX)
++ if ((cw < 0) && (src[0] == MUTT_SPECIAL_INDEX))
++ {
++ cl = 2; /* skip the index coloring sequence */
++ cw = 0;
++ }
++ else if (cw < 0 && cl == 1 && src[0] && src[0] < MUTT_TREE_MAX)
+ cw = 1;
+ else if (cw < 0)
+ cw = 0; /* unprintable wchar */
diff --git a/mail-client/mutt/mutt-1.6.1-r2.ebuild b/mail-client/mutt/mutt-1.6.1-r2.ebuild
index 897993e36d0f..4188245f947e 100644
--- a/mail-client/mutt/mutt-1.6.1-r2.ebuild
+++ b/mail-client/mutt/mutt-1.6.1-r2.ebuild
@@ -106,6 +106,7 @@ src_prepare() {
-e '/ReachingUs = N_(/a\"This release of Mutt is heavily enriched by NeoMutt patches.\\nFor this reason, any bugs are better reported at https://bugs.gentoo.org/\\nor directly to the NeoMutt project.\\n\\n"' \
version.c || die "Failed to add bug instructions"
+ epatch "${FILESDIR}"/mutt-1.6.1-neomutt-index_format_truncation_problem.patch
local upatches=
# allow user patches
eapply_user && upatches=" with user patches"