]> granicus.if.org Git - neomutt/commitdiff
Unbreak exact address feature.
authorRocco Rutte <pdmef@gmx.net>
Thu, 1 Nov 2007 20:21:33 +0000 (21:21 +0100)
committerRocco Rutte <pdmef@gmx.net>
Thu, 1 Nov 2007 20:21:33 +0000 (21:21 +0100)
The problem was that when reading back tempfiles for pager display, trailing
\n were not removed from the input so the pager displayed 2 instead of 1.

INSTALL
UPDATING
rfc822.c

diff --git a/INSTALL b/INSTALL
index 3d6a3a227b4955e04ddb632a66488c361368498f..d9d96a7d18835ecc8fd8c1b326a45b817a1cef5e 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -193,9 +193,6 @@ to ``configure'' to help it out, or change the default behavior:
        addresses in the same form they are parsed.  NOTE: this requires
        significantly more memory.
 
-       WARNING: DO NOT USE THIS OPTION, IT IS BROKEN.
-
-
 Once ``configure'' has completed, simply type ``make install.''
 
 Mutt should compile cleanly (without errors) and you should end up with a
index 877e0ef796970c2738c2d9819625b975d756c961..eb9d05ed111ec9f507ef74b99e3206d47aafd1bc 100644 (file)
--- a/UPDATING
+++ b/UPDATING
@@ -4,6 +4,7 @@ mutt. Please read this file carefully when upgrading your installation.
 The keys used are:
   !: modified feature, -: deleted feature, +: new feature
 
+  ! --enable-exact-address works again
   + next-unread-mailbox
   + $message_cache_clean (clean cache on sync)
   + %P expando for $pager_format
index 7b05e3039b4d3bb859e41ebc9af152cd7f5493a2..4500e67da915375ae3ce9e509384aeae917bd894 100644 (file)
--- a/rfc822.c
+++ b/rfc822.c
@@ -337,7 +337,7 @@ add_addrspec (ADDRESS **top, ADDRESS **last, const char *phrase,
 
 ADDRESS *rfc822_parse_adrlist (ADDRESS *top, const char *s)
 {
-  int ws_pending;
+  int ws_pending, nl;
   const char *begin, *ps;
   char comment[STRING], phrase[STRING];
   size_t phraselen = 0, commentlen = 0;
@@ -350,6 +350,8 @@ ADDRESS *rfc822_parse_adrlist (ADDRESS *top, const char *s)
     last = last->next;
 
   ws_pending = isspace ((unsigned char) *s);
+  if ((nl = mutt_strlen (s)))
+    nl = s[nl - 1] == '\n';
   
   SKIPWS (s);
   begin = s;
@@ -500,7 +502,7 @@ ADDRESS *rfc822_parse_adrlist (ADDRESS *top, const char *s)
   }
 #ifdef EXACT_ADDRESS
   if (last)
-    last->val = mutt_substrdup (begin, s);
+    last->val = mutt_substrdup (begin, s - nl < begin ? begin : s - nl);
 #endif
 
   return top;