1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-31 07:33:01 +00:00

Change Ctrl-C and move old behavior to Ctrl-Q

This lets Janet be a better unix citizen and lets Ctrl-C
raise an interrupt. Trying to make Janet behave superficially
like a shell by overriding Ctrl-C is not helpful.
This commit is contained in:
Calvin Rose
2020-12-29 16:20:37 -06:00
parent cc2cc4db43
commit 27b1f59aa9
3 changed files with 14 additions and 0 deletions

View File

@@ -758,6 +758,10 @@ static int line() {
kleft();
break;
case 3: /* ctrl-c */
clearlines();
gbl_sigint_flag = 1;
return -1;
case 17: /* ctrl-q */
gbl_cancel_current_repl_form = 1;
clearlines();
return -1;