vi: fix incorrect memory access on brace matching. Closes 7256
authorDenys Vlasenko <vda.linux@googlemail.com>
Mon, 15 Sep 2014 15:06:10 +0000 (17:06 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 15 Sep 2014 15:06:10 +0000 (17:06 +0200)
commit05399fc53dc0b812727e44189882181ecaf3b6d6
treeefc93581856e68572359cfd3d6836a205352f0d1
parent26a8b9f1967d910033c516462c101100e041a9b4
vi: fix incorrect memory access on brace matching. Closes 7256

While at it, fix brace matching to actually show the match
(missed fflush was causing cursor positioning to be buffered);
shorten brace matching code; remove unused macro indirection
in indicate_error().

Custom linker script 'busybox_ldscript' found, using it
function                                             old     new   delta
indicate_error                                         -      61     +61
mysleep                                               43      56     +13
char_insert                                          483     486      +3
find_pair                                            167     124     -43
Indicate_Error                                        61       -     -61
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 2/1 up/down: 77/-104)           Total: -27 bytes

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