aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-04-13 13:26:49 +0000
committerEric Andersen <andersen@codepoet.org>2002-04-13 13:26:49 +0000
commit65a0730c9fffa67249c248a83f1f2188cb84f9ea (patch)
treed5f4729393ab6f394234b99762aed7527b97dffe
parent3e6908b5865d8e3ab3a986cd5a5ad86c4cea7ff5 (diff)
downloadbusybox-w32-65a0730c9fffa67249c248a83f1f2188cb84f9ea.tar.gz
busybox-w32-65a0730c9fffa67249c248a83f1f2188cb84f9ea.tar.bz2
busybox-w32-65a0730c9fffa67249c248a83f1f2188cb84f9ea.zip
Patch from Jim Treadway and Vladimir Oleynik to Add CTRL-K
and fix CTRL-L support for cmdedit.c
-rw-r--r--shell/cmdedit.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/shell/cmdedit.c b/shell/cmdedit.c
index 3810c230a..b0309fef1 100644
--- a/shell/cmdedit.c
+++ b/shell/cmdedit.c
@@ -1263,14 +1263,18 @@ prepare_to_die:
1263 input_tab(&lastWasTab); 1263 input_tab(&lastWasTab);
1264#endif 1264#endif
1265 break; 1265 break;
1266 case 12: 1266 case 11:
1267 /* Control-l -- clear screen 1267 /* Control-k -- clear to end of line */
1268 * if the len=0 and no chars in edit line */ 1268 *(command + cursor) = 0;
1269 if (len == 0) { 1269 len = cursor;
1270 printf("\033[H\033[J"); 1270 redraw(cmdedit_y, 0);
1271 put_prompt(); 1271 break;
1272 } else { 1272 case 12:
1273 beep(); 1273 {
1274 /* Control-l -- clear screen */
1275 int old_cursor = cursor;
1276 printf("\033[H");
1277 redraw(0, len-old_cursor);
1274 } 1278 }
1275 break; 1279 break;
1276 case 14: 1280 case 14: