diff --git a/src/screen_utils.c b/src/screen_utils.c
index 891b9b3cb61bac1f673d1d45908712839d84f09d..8f69930d64126752b048164fcd1a8d7e9d0df379 100644 (file)
--- a/src/screen_utils.c
+++ b/src/screen_utils.c
static bool
ignore_key(int key)
{
- return key == ERR;
+ return
+#ifdef HAVE_GETMOUSE
+ /* ignore mouse events */
+ key == KEY_MOUSE ||
+#endif
+ key == ERR;
}
int
int key;
while (ignore_key(key = wgetch(w))) {}
-#ifdef HAVE_GETMOUSE
- /* ignore mouse events */
- if (key == KEY_MOUSE)
- return screen_getch(prompt);
-#endif
-
noecho();
curs_set(0);