X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-ui%2Fenter.c;h=bea29afd17791e7e853f21e326eeca1471c25c2f;hp=10053654251b07ef7cadbd63d01dafcca14c20dd;hb=5dcac54e5db074dc4572f843666c7f7acaf2d109;hpb=97e1d274dfbeb8b4a5da3f2b68fb66f96b7739d3 diff --git a/lib-ui/enter.c b/lib-ui/enter.c index 1005365..bea29af 100644 --- a/lib-ui/enter.c +++ b/lib-ui/enter.c @@ -8,9 +8,8 @@ * please see the file GPL in the top level source directory. */ -#include +#include -#include "curses.h" #include "enter.h" #include "menu.h" @@ -58,10 +57,10 @@ static int my_addwch (wchar_t wc) if (iswprint(wc) && n > 0) return mutt_addwch (wc); if (!(wc & ~0x7f)) - return printw ("^%c", ((int) wc + 0x40) & 0x7f); + return wprintw (stdscr, "^%c", ((int) wc + 0x40) & 0x7f); if (!(wc & ~0xffff)) - return printw ("\\u%04x", (int) wc); - return printw ("\\u%08x", (int) wc); + return wprintw (stdscr, "\\u%04x", (int) wc); + return wprintw (stdscr, "\\u%08x", (int) wc); } static size_t width_ceiling (const wchar_t * s, size_t n, int w1) @@ -243,7 +242,7 @@ int _mutt_enter_string (char *buf, size_t buflen, int y, int x, width_ceiling (state->wbuf, state->lastchar, my_wcswidth (state->wbuf, state->curpos) - width / 2); - move (y, x); + wmove (stdscr, y, x); w = 0; for (i = state->begin; i < state->lastchar; i++) { w += my_wcwidth (state->wbuf[i]); @@ -251,10 +250,10 @@ int _mutt_enter_string (char *buf, size_t buflen, int y, int x, break; my_addwch (state->wbuf[i]); } - clrtoeol (); - move (y, - x + my_wcswidth (state->wbuf + state->begin, - state->curpos - state->begin)); + wclrtoeol (stdscr); + wmove (stdscr, y, + x + my_wcswidth (state->wbuf + state->begin, + state->curpos - state->begin)); } mutt_refresh ();