# HG changeset patch # User Matti Hamalainen # Date 1338669186 -10800 # Node ID 8734a02a86ecf98b5d11c4a8d738dbbb1ef26bb0 # Parent 12939e665e499358ef2472452e339b233c352b2e Improve prompt function. diff -r 12939e665e49 -r 8734a02a86ec ui.c --- a/ui.c Sat Jun 02 22:38:47 2012 +0300 +++ b/ui.c Sat Jun 02 23:33:06 2012 +0300 @@ -285,19 +285,17 @@ char *nnwin_prompt_requester(const char *info, BOOL allowEmpty) { - char tmpBuf[512], *ptr; - int curSave = curs_set(1); + char buf[512], *ptr; echo(); + wattrset(stdscr, A_NORMAL); + wbkgdset(stdscr, COLOR_PAIR(0)); waddstr(stdscr, info); - wgetnstr(stdscr, tmpBuf, sizeof(tmpBuf) - 1); + wgetnstr(stdscr, buf, sizeof(buf) - 1); noecho(); - if (curSave != ERR) - curs_set(curSave); - - str_trim_right(tmpBuf); - ptr = str_trim_left(tmpBuf); + str_trim_right(buf); + ptr = str_trim_left(buf); if (allowEmpty || ptr[0]) return th_strdup(ptr);