From b8ba9b038c668dd7576fcf1855cfa3f404924ca3 Mon Sep 17 00:00:00 2001 From: James Booth Date: Tue, 7 Oct 2014 21:12:19 +0100 Subject: Added scroll support to occupant list --- src/ui/inputwin.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/ui/inputwin.c') diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c index 8bebfce8..153361a6 100644 --- a/src/ui/inputwin.c +++ b/src/ui/inputwin.c @@ -120,7 +120,7 @@ inp_block(void) } wint_t -inp_get_char(char *input, int *size) +inp_get_char(char *input, int *size, int *result) { wint_t ch; int display_size = 0; @@ -131,7 +131,7 @@ inp_get_char(char *input, int *size) // echo off, and get some more input noecho(); - int result = wget_wch(inp_win, &ch); + *result = wget_wch(inp_win, &ch); gboolean in_command = FALSE; if ((display_size > 0 && input[0] == '/') || @@ -140,12 +140,12 @@ inp_get_char(char *input, int *size) } if (prefs_get_boolean(PREF_STATES)) { - if (result == ERR) { + if (*result == ERR) { prof_handle_idle(); } if (prefs_get_boolean(PREF_OUTTYPE) - && (result != ERR) - && (result != KEY_CODE_YES) + && (*result != ERR) + && (*result != KEY_CODE_YES) && !in_command && _printable(ch)) { prof_handle_activity(); @@ -153,8 +153,8 @@ inp_get_char(char *input, int *size) } // if it wasn't an arrow key etc - if (!_handle_edit(result, ch, input, size)) { - if (_printable(ch) && result != KEY_CODE_YES) { + if (!_handle_edit(*result, ch, input, size)) { + if (_printable(ch) && *result != KEY_CODE_YES) { if (*size >= INP_WIN_MAX) { return ERR; } -- cgit 1.4.1-2-gfad0