From 9874470c8f83e78ebcc894c38b2a7134c1a9d761 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sat, 9 Feb 2013 20:39:52 +0000 Subject: Fixed input win printing of '%' char --- .gitignore | 3 +-- src/ui/inputwin.c | 14 +++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index d2d853a2..c133d04c 100644 --- a/.gitignore +++ b/.gitignore @@ -27,5 +27,4 @@ stamp-h1 *dirstamp valgrind.out core -error.txt -error2.txt +bugs/ diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c index 9fd7196c..06c256cd 100644 --- a/src/ui/inputwin.c +++ b/src/ui/inputwin.c @@ -152,7 +152,7 @@ inp_get_char(char *input, int *size) *size += utf_len; input[*size] = '\0'; - wprintw(inp_win, next_ch); + waddstr(inp_win, next_ch); wmove(inp_win, 0, inp_x + 1); if (inp_x - pad_start > cols-3) { @@ -173,7 +173,7 @@ inp_get_char(char *input, int *size) input[*size] = '\0'; bytes[utf_len] = '\0'; - wprintw(inp_win, bytes); + waddstr(inp_win, bytes); display_size++; // if gone over screen size follow input @@ -222,7 +222,7 @@ inp_replace_input(char *input, const char * const new_input, int *size) display_size = g_utf8_strlen(input, *size); inp_win_reset(); input[*size] = '\0'; - wprintw(inp_win, input); + waddstr(inp_win, input); _go_to_end(display_size); } @@ -420,7 +420,7 @@ _handle_edit(int result, const wint_t ch, char *input, int *size) g_free(start); _clear_input(); - wprintw(inp_win, input); + waddstr(inp_win, input); wmove(inp_win, 0, inp_x -1); // if in middle, delete and shift chars left @@ -440,7 +440,7 @@ _handle_edit(int result, const wint_t ch, char *input, int *size) g_string_free(new, FALSE); _clear_input(); - wprintw(inp_win, input); + waddstr(inp_win, input); wmove(inp_win, 0, inp_x -1); } @@ -467,7 +467,7 @@ _handle_edit(int result, const wint_t ch, char *input, int *size) g_free(start); _clear_input(); - wprintw(inp_win, input); + waddstr(inp_win, input); } else if (inp_x < display_size-1) { gchar *start = g_utf8_substring(input, 0, inp_x); gchar *end = g_utf8_substring(input, inp_x+1, *size); @@ -484,7 +484,7 @@ _handle_edit(int result, const wint_t ch, char *input, int *size) g_string_free(new, FALSE); _clear_input(); - wprintw(inp_win, input); + waddstr(inp_win, input); wmove(inp_win, 0, inp_x); } return 1; -- cgit 1.4.1-2-gfad0