X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-ui%2Fcurs_lib.c;h=cfdba38ba781115ef22b5033bce30372096a38fe;hb=d8c2844a5a8b0fcf09158dcdd452f6e43e29b5db;hp=dc42e300abd7b56910d0babfee68f88405cdee53;hpb=51f3b41879d6df19c4549803a11e9f0dd34c8ffb;p=apps%2Fmadmutt.git diff --git a/lib-ui/curs_lib.c b/lib-ui/curs_lib.c index dc42e30..cfdba38 100644 --- a/lib-ui/curs_lib.c +++ b/lib-ui/curs_lib.c @@ -21,7 +21,7 @@ #include #include "menu.h" -#include "enter.h" +#include "browser.h" #include "mutt.h" #include "pager.h" @@ -61,44 +61,6 @@ event_t mutt_getch (void) return (ch == ctrl ('G') ? err : ret); } -#ifndef waddnwstr -int waddwch(WINDOW *win, wchar_t wc) -{ - char buf[MB_LEN_MAX * 2]; - mbstate_t mbstate; - ssize_t n1, n2; - - p_clear(&mbstate, 1); - if ((n1 = wcrtomb(buf, wc, &mbstate)) == -1 - || (n2 = wcrtomb(buf + n1, 0, &mbstate)) == -1) - return -1; /* ERR */ - return waddstr(win, buf); -} -#endif - - -int _mutt_get_field ( const char *field, char *buf, ssize_t buflen, - int complete, int multiple, char ***files, int *numfiles) -{ - int ret; - int x, y; - - ENTER_STATE *es = mutt_new_enter_state (); - - do { - CLEARLINE(stdscr, LINES - 1); - waddstr (stdscr, field); - mutt_refresh (); - getyx (stdscr, y, x); - ret = _mutt_enter_string(buf, buflen, y, x, complete, multiple, files, - numfiles, es); - } while (ret == 1); - CLEARLINE(stdscr, LINES - 1); - mutt_free_enter_state (&es); - - return (ret); -} - int mutt_get_field_unbuffered (char *msg, char *buf, ssize_t buflen, int flags) { int rc; @@ -148,7 +110,7 @@ void mutt_edit_file(const char *data) getmaxyx(main_w, mh, mw); SigChild = 0; - rt = madtty_create(mh - 1, mw); + rt = madtty_create(mh - 2, mw); pid = madtty_forkpty(rt, args[0], args, &pty); if (pid < 0) { madtty_destroy(rt); @@ -156,6 +118,9 @@ void mutt_edit_file(const char *data) return; } + SETCOLOR(main_w, MT_COLOR_SIDEBAR); + mvwhline(main_w, 0, 0, ACS_HLINE, mw); + nodelay(stdscr, true); gettimeofday(&next, NULL); while (!SigChild) { @@ -181,7 +146,7 @@ void mutt_edit_file(const char *data) gettimeofday(&tv, NULL); if (dirty && is_expired(tv, next)) { - madtty_draw(rt, main_w, 0, 0); + madtty_draw(rt, main_w, 1, 0); wrefresh(main_w); dirty = 0; next = timeval_add(tv, slice);