diff options
author | James Booth <boothj5@gmail.com> | 2015-01-15 22:53:50 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-01-15 22:53:50 +0000 |
commit | e326aaa84fd6a3f403e0ec80e02e2b766a5f74c7 (patch) | |
tree | 0a6cb9d1cc0ece646a90a5173a9be46fc23955d3 /src/ui/core.c | |
parent | 173a3a82bb196baf2d8cb7a093ffb6a594830e50 (diff) | |
parent | ad896ef201a92acb02b208013bc4ed996204a2df (diff) | |
download | profani-tty-e326aaa84fd6a3f403e0ec80e02e2b766a5f74c7.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.c | 11 |
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; |