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 23:31:06 +0000
committerJames Booth <boothj5@gmail.com>2015-01-15 23:31:06 +0000
commitbb11dc097320443c810ea0572f7b988bfa48e4a4 (patch)
treed47111ec274c16354c9769a1c1789805a740e492 /src/ui/core.c
parente326aaa84fd6a3f403e0ec80e02e2b766a5f74c7 (diff)
parent65fc4bcd9ff8e92c0f87e1c9520974a805a9ceac (diff)
downloadprofani-tty-bb11dc097320443c810ea0572f7b988bfa48e4a4.tar.gz
Merge branch 'master' into inp-utf8
Conflicts:
	src/ui/inputwin.c
Diffstat (limited to 'src/ui/core.c')
-rw-r--r--src/ui/core.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/ui/core.c b/src/ui/core.c
index 45dd2a08..9ded610b 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -74,7 +74,7 @@
 
 static char *win_title;
 
-static char input[INP_WIN_MAX];
+static char line[INP_WIN_MAX];
 static int inp_size;
 
 #ifdef HAVE_LIBXSS
@@ -181,19 +181,20 @@ ui_close(void)
 char*
 ui_readline(void)
 {
-    int result = 0;
-    wint_t ch = inp_get_char(input, &result);
+    int key_type;
+    wint_t ch;
+    inp_get_char(line, &key_type, &ch);
 
     _win_handle_switch(ch);
 
     ProfWin *current = wins_get_current();
-    win_handle_page(current, ch, result);
+    win_handle_page(current, ch, key_type);
 
     if (ch == KEY_RESIZE) {
         ui_resize();
     }
 
-    if (ch != ERR && result != ERR) {
+    if (ch != ERR && key_type != ERR) {
         ui_reset_idle_time();
         ui_input_nonblocking(TRUE);
     } else {
@@ -201,7 +202,7 @@ ui_readline(void)
     }
 
     if (ch == '\n') {
-        return input;
+        return line;
     } else {
         return NULL;
     }