diff options
-rw-r--r-- | shell/cmdedit.c | 20 |
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: |