mirror of
https://github.com/janet-lang/janet
synced 2024-09-29 15:30:41 +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:
parent
d8841de180
commit
789c5f135a
@ -364,11 +364,16 @@ static int line() {
|
|||||||
break;
|
break;
|
||||||
case 4: /* ctrl-d, eof */
|
case 4: /* ctrl-d, eof */
|
||||||
return -1;
|
return -1;
|
||||||
|
case 1: /* ctrl-a */
|
||||||
|
gbl_pos = 0;
|
||||||
|
refresh();
|
||||||
|
break;
|
||||||
case 2: /* ctrl-b */
|
case 2: /* ctrl-b */
|
||||||
kleft();
|
kleft();
|
||||||
break;
|
break;
|
||||||
case 5: /* ctrl-e */
|
case 5: /* ctrl-e */
|
||||||
gbl_pos = gbl_len;
|
gbl_pos = gbl_len;
|
||||||
|
refresh();
|
||||||
break;
|
break;
|
||||||
case 6: /* ctrl-f */
|
case 6: /* ctrl-f */
|
||||||
kright();
|
kright();
|
||||||
|
Loading…
Reference in New Issue
Block a user