diff options
author | Ron Yorston | 2021-04-10 10:20:31 +0100 |
---|---|---|
committer | Denys Vlasenko | 2021-04-11 00:18:55 +0200 |
commit | b18c7bf702b2d7d967b2baf7d70fd8c408191eb4 (patch) | |
tree | a80485dce8f0a1ad2414daff33b36fb09cb7a89b /libbb/pw_encrypt_sha.c | |
parent | e577afca7c94a7827bc216f4d8c95823d0f86489 (diff) | |
download | busybox-b18c7bf702b2d7d967b2baf7d70fd8c408191eb4.zip busybox-b18c7bf702b2d7d967b2baf7d70fd8c408191eb4.tar.gz |
vi: improvements to undo
The left shift operator ('<') didn't support undo at all; right
shift ('>') required changes to be undone separately for each line.
Allow both types of shift to be undone as a single operation.
Also, neither traditional vi nor vim yank the lines being shifted by
the '<' and '>' commands, so remove that call to yank_delete();
When a repetition count was specified for the '~', 'x', 'X' or 's'
commands the changes had to be undone one character at a time.
Allow undo as a single operation (though the delete and change
parts of the 's' command still have to be undone separately).
function old new delta
undo_push_insert 37 40 +3
do_cmd 4695 4663 -32
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 3/-32) Total: -29 bytes
v2: Don't break build when FEATURE_VI_UNDO is disabled. Don't reset
'undo_del' too early in '~' handling code. Code shrink '~'.
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/pw_encrypt_sha.c')
0 files changed, 0 insertions, 0 deletions