mirror of
https://github.com/janet-lang/janet
synced 2025-07-05 11:32:54 +00:00
Make ctrl-d behave like delete, but exit on an empty line.
This is the default readline behavior.
This commit is contained in:
parent
6bc67b70a6
commit
bc2ebce086
@ -620,8 +620,12 @@ static int line() {
|
|||||||
clearlines();
|
clearlines();
|
||||||
return -1;
|
return -1;
|
||||||
case 4: /* ctrl-d, eof */
|
case 4: /* ctrl-d, eof */
|
||||||
|
if (gbl_len == 0) { /* quit on empty line */
|
||||||
clearlines();
|
clearlines();
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
kdelete(1);
|
||||||
|
break;
|
||||||
case 5: /* ctrl-e */
|
case 5: /* ctrl-e */
|
||||||
gbl_pos = gbl_len;
|
gbl_pos = gbl_len;
|
||||||
refresh();
|
refresh();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user