summaryrefslogtreecommitdiffstats
path: root/enter.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-09-07 14:54:47 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-09-07 14:54:47 +0000
commite88150f1860fc1ba4aa7ee365df6558d72040e68 (patch)
tree67968035403f5da26ec4ff665737da7da0291f6c /enter.c
parent6ae3e43fdf6c328f1146ccb9a233d8e22b4d11d2 (diff)
Yet another fix to the alias and query completion stuff:
Skip leading white space when constructing the addresses.
Diffstat (limited to 'enter.c')
-rw-r--r--enter.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/enter.c b/enter.c
index d528713e..7ff8fb95 100644
--- a/enter.c
+++ b/enter.c
@@ -330,7 +330,9 @@ int mutt_enter_string (unsigned char *buf, size_t buflen, int y, int x,
if (curpos)
{
for (j = curpos - 1 ; j >= 0 && buf[j] != ',' ; j--);
- if (mutt_alias_complete ((char *) buf + j + 1, buflen - j - 1))
+ for (++j; buf[j] == ' '; j++)
+ ;
+ if (mutt_alias_complete ((char *) buf + j, buflen - j))
{
redraw = M_REDRAW_INIT;
continue;
@@ -385,7 +387,8 @@ int mutt_enter_string (unsigned char *buf, size_t buflen, int y, int x,
if (curpos)
{
for (j = curpos - 1 ; j >= 0 && buf[j] != ',' ; j--);
- mutt_query_complete ((char *) buf + j + 1, buflen - j - 1);
+ for (j++; buf[j] == ' '; j++);
+ mutt_query_complete ((char *) buf + j, buflen - j);
}
else
mutt_query_menu ((char *) buf, buflen);