diff options
author | Ron Yorston | 2019-02-03 10:13:17 +0000 |
---|---|---|
committer | Denys Vlasenko | 2019-02-08 12:57:58 +0100 |
commit | bb983f30e7ea69604212793f228270f21e8a5b06 (patch) | |
tree | 6514127fdcfe5b03a33270320d6856267cc24029 /procps/lsof.c | |
parent | e6503f2f0982378cd753be152fa19f8336c357bc (diff) | |
download | busybox-bb983f30e7ea69604212793f228270f21e8a5b06.zip busybox-bb983f30e7ea69604212793f228270f21e8a5b06.tar.gz |
vi: fix faulty undo after autoinsert
Enable autoinsert and enter the following with an indent of three
spaces:
line 1
line 2
Using 'u' to undo the last insert results in:
line1e 2
The insertion of the indent hasn't been properly recorded.
Since recording insertions is a common operation add a convenience
function, undo_push_insert(), to handle this and use it to record
the autoindent correctly.
function old new delta
undo_push_insert - 36 +36
string_insert 133 129 -4
char_insert 518 473 -45
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/2 up/down: 36/-49) Total: -13 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'procps/lsof.c')
0 files changed, 0 insertions, 0 deletions