diff options
-rw-r--r-- | src/getstring.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/getstring.c b/src/getstring.c index 6546565..186598d 100644 --- a/src/getstring.c +++ b/src/getstring.c @@ -191,7 +191,8 @@ enum getstr getstring(WINDOW * win, char *str, int l, int x, int y) getstr_print(win, x, y, &st); wins_doupdate(); - if ((ch = wgetch(win)) == '\n') + ch = wgetch(win); + if ((ch == '\n') || (ch == KEY_ENTER)) break; switch (ch) { case KEY_BACKSPACE: /* delete one character */ |