diff options
author | Ron Yorston <rmy@pobox.com> | 2016-04-24 12:56:59 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2016-04-24 12:56:59 +0100 |
commit | a89270b2be310c4255e9baa9a22966d3cd8ed9c8 (patch) | |
tree | 12fa1a222b4bdbcfba36b26402749077edf9daa9 | |
parent | a93d86689d85015b5bf465ab0ef810449bb55d41 (diff) | |
download | busybox-w32-a89270b2be310c4255e9baa9a22966d3cd8ed9c8.tar.gz busybox-w32-a89270b2be310c4255e9baa9a22966d3cd8ed9c8.tar.bz2 busybox-w32-a89270b2be310c4255e9baa9a22966d3cd8ed9c8.zip |
libbb/lineedit: only clear to EOL when deleting character
When the console buffer is large clearing to the end of the buffer
slows deletion noticeably. Only clear to end of line.
-rw-r--r-- | libbb/lineedit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 04361b509..9f96d4a0b 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -110,7 +110,7 @@ static bool BB_ispunct(CHAR_T c) { return ((unsigned)c < 256 && ispunct(c)); } | |||
110 | #define ESC "\033" | 110 | #define ESC "\033" |
111 | 111 | ||
112 | #define SEQ_CLEAR_TILL_END_OF_SCREEN ESC"[J" | 112 | #define SEQ_CLEAR_TILL_END_OF_SCREEN ESC"[J" |
113 | //#define SEQ_CLEAR_TILL_END_OF_LINE ESC"[K" | 113 | #define SEQ_CLEAR_TILL_END_OF_LINE ESC"[K" |
114 | 114 | ||
115 | 115 | ||
116 | enum { | 116 | enum { |
@@ -611,7 +611,7 @@ static void input_delete(int save) | |||
611 | command_len--; | 611 | command_len--; |
612 | put_till_end_and_adv_cursor(); | 612 | put_till_end_and_adv_cursor(); |
613 | /* Last char is still visible, erase it (and more) */ | 613 | /* Last char is still visible, erase it (and more) */ |
614 | printf(SEQ_CLEAR_TILL_END_OF_SCREEN); | 614 | printf(SEQ_CLEAR_TILL_END_OF_LINE); |
615 | input_backward(cursor - j); /* back to old pos cursor */ | 615 | input_backward(cursor - j); /* back to old pos cursor */ |
616 | } | 616 | } |
617 | 617 | ||