← Commit list

65a0730c9

Eric Andersen
Eric Andersen
2002-04-13
FAILED Duration: 63s

Subject

Patch from Jim Treadway and Vladimir Oleynik to Add CTRL-K and fix CTRL-L support for cmdedit.c

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/cmdedit.c+12 -8
@@ -1263,14 +1263,18 @@ prepare_to_die:
input_tab(&lastWasTab);
#endif
break;
- case 12:
- /* Control-l -- clear screen
- * if the len=0 and no chars in edit line */
- if (len == 0) {
- printf("\033[H\033[J");
- put_prompt();
- } else {
- beep();
+ case 11:
+ /* Control-k -- clear to end of line */
+ *(command + cursor) = 0;
+ len = cursor;
+ redraw(cmdedit_y, 0);
+ break;
+ case 12:
+ {
+ /* Control-l -- clear screen */
+ int old_cursor = cursor;
+ printf("\033[H");
+ redraw(0, len-old_cursor);
}
break;
case 14: