Commit 2b1bc686 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

input: don't crash when receiving a KEY_CANCEL


On some systems, typing ^C apparently results in a KEY_CANCEL in
the input stream, which gets hard-bound to the do_cancel function.
But in the main menu there is no Cancel function.  So... in that
case, let it fall back to the plain old Ctrl-C code: 0x03.
Reported-by: default avatarLiam Gretton <liam.gretton@leicester.ac.uk>
parent 90b959a6
Showing with 1 addition and 1 deletion
+1 -1
......@@ -667,7 +667,7 @@ int parse_kbinput(WINDOW *win)
#endif
/* Slang doesn't support KEY_CANCEL. */
case KEY_CANCEL:
return first_sc_for(currmenu, do_cancel)->keycode;
return sc_seq_or(do_cancel, 0x03);
#endif
#ifdef KEY_SUSPEND
#ifdef KEY_SSUSPEND
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment