Commit 68833d5d authored by Brendan Cully's avatar Brendan Cully

Make username prompts unbuffered like password prompts are (no more

folder-hook push garbage)
parent 75de71a3
......@@ -153,7 +153,7 @@ int mutt_account_getuser (ACCOUNT* account)
{
snprintf (prompt, sizeof (prompt), _("Username at %s: "), account->host);
strfcpy (account->user, NONULL (Username), sizeof (account->user));
if (mutt_get_field (prompt, account->user, sizeof (account->user), 0))
if (mutt_get_string_unbuffered (prompt, account->user, sizeof (account->user), 0))
return -1;
}
......
......@@ -138,14 +138,14 @@ int _mutt_get_field (/* const */ char *field, char *buf, size_t buflen, int comp
return (ret);
}
int mutt_get_password (char *msg, char *buf, size_t buflen)
int mutt_get_string_unbuffered (char *msg, char *buf, size_t buflen, int flags)
{
int rc;
CLEARLINE (LINES-1);
addstr (msg);
set_option (OPTUNBUFFEREDINPUT);
rc = mutt_enter_string (buf, buflen, LINES - 1, mutt_strlen (msg), M_PASS);
rc = mutt_enter_string (buf, buflen, LINES - 1, mutt_strlen (msg), flags);
unset_option (OPTUNBUFFEREDINPUT);
CLEARLINE (LINES-1);
return (rc);
......
......@@ -293,7 +293,8 @@ int _mutt_enter_string (char *, size_t, int, int, int, int, char ***, int *, ENT
#define mutt_get_field(A,B,C,D) _mutt_get_field(A,B,C,D,0,NULL,NULL)
int _mutt_get_field (char *, char *, size_t, int, int, char ***, int *);
int mutt_get_hook_type (const char *);
int mutt_get_password (char *, char *, size_t);
int mutt_get_string_unbuffered (char *, char *, size_t, int);
#define mutt_get_password(A,B,C) mutt_get_string_unbuffered(A,B,C,M_PASS)
int mutt_get_postponed (CONTEXT *, HEADER *, HEADER **, char *, size_t);
int mutt_get_tmp_attachment (BODY *);
int mutt_index_menu (void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment