aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-05-11 14:49:13 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-05-11 14:49:13 +0200
commit94043e8ad2d30cc2199b35d18c853314ade174a3 (patch)
tree4647f99bce2f4c8075e8a4a2cd07c90c21e2b4e9 /editors
parentda1382410bbc0dccad0d3936774a9232509f7deb (diff)
downloadbusybox-94043e8ad2d30cc2199b35d18c853314ade174a3.tar.gz
lineedit: change how cmdedit_set_out_char works
Rename two badly names functions, use "clear to end of screen" to eliminate annoying problems with clearing wide/combining chars, and such. Run tested. function old new delta put_cur_glyph_and_inc_cursor - 124 +124 put_till_end_and_adv_cursor - 24 +24 input_delete 125 130 +5 Ceos 5 4 -1 Ceol 5 4 -1 input_end 24 - -24 cmdedit_set_out_char 122 - -122 ------------------------------------------------------------------------------ (add/remove: 2/2 grow/shrink: 1/2 up/down: 153/-148) Total: 5 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'editors')
-rw-r--r--editors/vi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/editors/vi.c b/editors/vi.c
index d3a35e781..b8cacb43f 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -65,8 +65,8 @@ static const char SOn[] ALIGN1 = "\033[0m";
/* terminal bell sequence */
static const char bell[] ALIGN1 = "\007";
/* Clear-end-of-line and Clear-end-of-screen ESC sequence */
-static const char Ceol[] ALIGN1 = "\033[0K";
-static const char Ceos[] ALIGN1 = "\033[0J";
+static const char Ceol[] ALIGN1 = "\033[K";
+static const char Ceos[] ALIGN1 = "\033[J";
/* Cursor motion arbitrary destination ESC sequence */
static const char CMrc[] ALIGN1 = "\033[%d;%dH";
/* Cursor motion up and down ESC sequence */