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>
This commit is contained in:
@ -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 */
|
||||
|
Reference in New Issue
Block a user