summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRocco Rutte <pdmef@gmx.net>2007-11-01 21:21:33 +0100
committerRocco Rutte <pdmef@gmx.net>2007-11-01 21:21:33 +0100
commit9f47e58c8e737577a1271bdec20d8437cbc01771 (patch)
tree4bcbf610d60052462cabb8ccf4f6964d5b297735
parent974a27b32a9bc8ce1e17f2099a4b2e39b27dddf4 (diff)
Unbreak exact address feature.
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.
-rw-r--r--INSTALL3
-rw-r--r--UPDATING1
-rw-r--r--rfc822.c6
3 files changed, 5 insertions, 5 deletions
diff --git a/INSTALL b/INSTALL
index 3d6a3a22..d9d96a7d 100644
--- 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
diff --git a/UPDATING b/UPDATING
index 877e0ef7..eb9d05ed 100644
--- 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
diff --git a/rfc822.c b/rfc822.c
index 7b05e303..4500e67d 100644
--- 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;