diff options
author | James Booth <boothj5@gmail.com> | 2015-01-15 22:51:05 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-01-15 22:51:05 +0000 |
commit | ad896ef201a92acb02b208013bc4ed996204a2df (patch) | |
tree | a8c0278f60ce85e7061d2889030f15783b16277b /src/ui/core.c | |
parent | 82c986775d0ece765b483256c218e0c42c6b14fc (diff) | |
download | profani-tty-ad896ef201a92acb02b208013bc4ed996204a2df.tar.gz |
Moved input size to inputwin
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; |