lineedit: implement Unicode-aware line editing (optional)
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 10 Jul 2009 16:40:49 +0000 (18:40 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 10 Jul 2009 16:40:49 +0000 (18:40 +0200)
commit2e6d4ef695c4be0ff1963e24315bc5bec6c5313b
tree25c38a76c639d630b8a6e9c415e4d9e1a5e770d9
parent860d2bbdda67acfec39cd28e38881633ec4e66d6
lineedit: implement Unicode-aware line editing (optional)

When off:

function                                             old     new   delta
input_delete                                         133     140      +7
vi_word_motion                                       236     240      +4
vi_Back_motion                                        89      92      +3
vi_end_motion                                        223     225      +2
cmdedit_set_out_char                                  74      76      +2
vi_back_motion                                       198     199      +1
vi_Word_motion                                        87      88      +1
vi_End_motion                                         92      86      -6
read_line_input                                     6293    6270     -23
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 7/2 up/down: 20/-29)             Total: -9 bytes

When on:

lineedit_read_key                                    146     272    +126
BB_PUTCHAR                                             -      94     +94
read_line_input                                     6293    6351     +58
save_string                                            -      43     +43
wcstombs                                               -      38     +38
mbstowcs                                               -      38     +38
save_command_ps_at_cur_history                        65      93     +28
input_delete                                         133     148     +15
vi_Back_motion                                        89      90      +1
vi_Word_motion                                        87      86      -1
cmdedit_set_out_char                                  74      73      -1
vi_End_motion                                         92      84      -8
vi_back_motion                                       198     187     -11
vi_word_motion                                       236     206     -30
vi_end_motion                                        223     184     -39
------------------------------------------------------------------------------
(add/remove: 4/0 grow/shrink: 5/6 up/down: 441/-90)           Total: 351 bytes

There is one TODO and maybe some bugs :)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb/lineedit.c