1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-25 22:53:16 +00:00

Add ctrl-a and ctrl-e to control line in repl

Emacs to start of line and to end of line key bindings.
This commit is contained in:
Calvin Rose 2020-01-17 09:33:30 -06:00
parent d8841de180
commit 789c5f135a

View File

@ -364,11 +364,16 @@ static int line() {
break;
case 4: /* ctrl-d, eof */
return -1;
case 1: /* ctrl-a */
gbl_pos = 0;
refresh();
break;
case 2: /* ctrl-b */
kleft();
break;
case 5: /* ctrl-e */
gbl_pos = gbl_len;
refresh();
break;
case 6: /* ctrl-f */
kright();