about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-02-09 20:39:52 +0000
committerJames Booth <boothj5@gmail.com>2013-02-09 20:39:52 +0000
commit9874470c8f83e78ebcc894c38b2a7134c1a9d761 (patch)
tree6fc1ba8bd2454f62babede6c55bbe9dea32b6de2
parenta01c0a9fddc8fa2ca1d3b6b7c787df35254a60e0 (diff)
downloadprofani-tty-9874470c8f83e78ebcc894c38b2a7134c1a9d761.tar.gz
Fixed input win printing of '%' char
-rw-r--r--.gitignore3
-rw-r--r--src/ui/inputwin.c14
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;