X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-ui%2Fcurs_lib.c;h=437ffbcc187614edb3d370f71db05a1f5e1ae92f;hb=00f34116b32751764d42f81159c292d850c74bac;hp=8e741535d084ee49680f1553354a1e2770808589;hpb=8ab1ab66eb1c4b95f9b2a5ed9c2b2cf1dfa74544;p=apps%2Fmadmutt.git diff --git a/lib-ui/curs_lib.c b/lib-ui/curs_lib.c index 8e74153..437ffbc 100644 --- a/lib-ui/curs_lib.c +++ b/lib-ui/curs_lib.c @@ -26,6 +26,7 @@ #include "mutt.h" #include "pager.h" #include "charset.h" +#include "madtty.h" /* not possible to unget more than one char under some curses libs, and it * is impossible to unget function keys in SLang, so roll our own input @@ -199,6 +200,7 @@ int mutt_yesorno (const char *msg, int def) waddstr (stdscr, (char *) (def == M_YES ? yes : no)); mutt_refresh (); } + CLEARLINE(stdscr, LINES - 1); return (def); } @@ -211,7 +213,7 @@ void mutt_query_exit (void) wtimeout (stdscr, -1); /* restore blocking operation */ if (mutt_yesorno (_("Exit Madmutt?"), M_YES) == M_YES) { mutt_endwin (NULL); - exit (1); + mutt_exit(1); } mutt_clear_error (); mutt_curs_set (-1); @@ -308,18 +310,17 @@ void mutt_show_error (void) void curses_initialize(void) { + initscr(); + start_color(); + madtty_init_colors(); ci_start_color(); - keypad(stdscr, true); - cbreak(); noecho(); - typeahead (-1); /* simulate smooth scrolling */ + raw(); + keypad(stdscr, true); + typeahead(-1); meta(stdscr, true); -} - -void _mutt_perror (const char *s, const char* filename, int line) -{ - char *p = strerror (errno); - mutt_error ("%s: %s (errno = %d) from %s:%i", s, p ? p : _("unknown error"), errno, filename, line); + curs_set(0); + ESCDELAY = 50; } /*