diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1998-10-21 15:40:17 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1998-10-21 15:40:17 +0000 |
commit | e84c17069aad366dc9eb72ed344ceffeb3e84d3d (patch) | |
tree | 7ebf19205c0aff75ebc448ba07b2a1f6a1031b65 /curs_lib.c | |
parent | 735c8718c6608f708650465759b25df3759eab13 (diff) |
Byrial Jensen's mutt_multi_choice() patch plus some German
translations.
Diffstat (limited to 'curs_lib.c')
-rw-r--r-- | curs_lib.c | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -378,3 +378,31 @@ void mutt_curs_set (int cursor) curs_set (cursor); } #endif + +int mutt_multi_choice (char *prompt, char *letters) +{ + event_t ch; + int choice = 0; + char *p; + + mvaddstr (LINES - 1, 0, prompt); + clrtoeol (); + while (!choice) + { + mutt_refresh (); + ch = mutt_getch (); + if (ch.ch == -1) + choice = -1; + else + { + p = strchr (letters, ch.ch); + if (p) + choice = p - letters + 1; + else + BEEP (); + } + } + CLEARLINE (LINES - 1); + mutt_refresh (); + return choice; +} |