diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1998-09-07 14:54:47 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1998-09-07 14:54:47 +0000 |
commit | e88150f1860fc1ba4aa7ee365df6558d72040e68 (patch) | |
tree | 67968035403f5da26ec4ff665737da7da0291f6c | |
parent | 6ae3e43fdf6c328f1146ccb9a233d8e22b4d11d2 (diff) |
Yet another fix to the alias and query completion stuff:
Skip leading white space when constructing the addresses.
-rw-r--r-- | enter.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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); |