about summary refs log tree commit diff stats
path: root/src/ui/core.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-01-15 22:51:05 +0000
committerJames Booth <boothj5@gmail.com>2015-01-15 22:51:05 +0000
commitad896ef201a92acb02b208013bc4ed996204a2df (patch)
treea8c0278f60ce85e7061d2889030f15783b16277b /src/ui/core.c
parent82c986775d0ece765b483256c218e0c42c6b14fc (diff)
downloadprofani-tty-ad896ef201a92acb02b208013bc4ed996204a2df.tar.gz
Moved input size to inputwin
Diffstat (limited to 'src/ui/core.c')
-rw-r--r--src/ui/core.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/ui/core.c b/src/ui/core.c
index f1a563d7..45dd2a08 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -182,14 +182,7 @@ char*
 ui_readline(void)
 {
     int result = 0;
-    gboolean return_line = FALSE;
-
-    wint_t ch = inp_get_char(input, &inp_size, &result);
-    if (ch == '\n') {
-        input[inp_size++] = '\0';
-        inp_size = 0;
-        return_line = TRUE;
-    }
+    wint_t ch = inp_get_char(input, &result);
 
     _win_handle_switch(ch);
 
@@ -207,7 +200,7 @@ ui_readline(void)
         ui_input_nonblocking(FALSE);
     }
 
-    if (return_line) {
+    if (ch == '\n') {
         return input;
     } else {
         return NULL;