From e88150f1860fc1ba4aa7ee365df6558d72040e68 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Mon, 7 Sep 1998 14:54:47 +0000 Subject: Yet another fix to the alias and query completion stuff: Skip leading white space when constructing the addresses. --- enter.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'enter.c') 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); -- cgit v1.2.3