mirror of
https://github.com/sheumann/hush.git
synced 2025-01-15 18:30:43 +00:00
Patch from Jim Treadway and Vladimir Oleynik to Add CTRL-K
and fix CTRL-L support for cmdedit.c
This commit is contained in:
parent
3e6908b586
commit
65a0730c9f
@ -1263,14 +1263,18 @@ prepare_to_die:
|
|||||||
input_tab(&lastWasTab);
|
input_tab(&lastWasTab);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
case 11:
|
||||||
|
/* Control-k -- clear to end of line */
|
||||||
|
*(command + cursor) = 0;
|
||||||
|
len = cursor;
|
||||||
|
redraw(cmdedit_y, 0);
|
||||||
|
break;
|
||||||
case 12:
|
case 12:
|
||||||
/* Control-l -- clear screen
|
{
|
||||||
* if the len=0 and no chars in edit line */
|
/* Control-l -- clear screen */
|
||||||
if (len == 0) {
|
int old_cursor = cursor;
|
||||||
printf("\033[H\033[J");
|
printf("\033[H");
|
||||||
put_prompt();
|
redraw(0, len-old_cursor);
|
||||||
} else {
|
|
||||||
beep();
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 14:
|
case 14:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user