diff options
author | Ron Yorston | 2021-04-06 13:40:23 +0100 |
---|---|---|
committer | Denys Vlasenko | 2021-04-11 00:18:55 +0200 |
commit | b7b1119d9f95cc956eb0161a59ee21a1daca8f52 (patch) | |
tree | 230b99719a414b668601bc75b083c54da413ef2a /editors/sed1line.txt | |
parent | 7ce0e75c1f26d9cb3061c64aeab3204f62a5b55c (diff) | |
download | busybox-b7b1119d9f95cc956eb0161a59ee21a1daca8f52.zip busybox-b7b1119d9f95cc956eb0161a59ee21a1daca8f52.tar.gz |
vi: improvements to range selection
Rewrite find_range(), pushing quite a bit of code from do_cmd()
down into it.
- The commands 'y', 'd', 'c', '<' and '>' can be given twice to
specify a whole-line range. BusyBox vi actually accepted any
second character from that group, e.g. 'dc' or '<y', with the
latter being accepted even if yank was disabled. Require the
two characters to match.
- '<' and '>' commands followed by ESC incorrectly issued an alert.
- Allow search commands and a marker (specified as "y'a", for example)
to define a range for those operators that support it.
function old new delta
find_range 518 707 +189
.rodata 105119 105133 +14
get_motion_char 68 - -68
do_cmd 4860 4695 -165
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 2/1 up/down: 203/-233) Total: -30 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'editors/sed1line.txt')
0 files changed, 0 insertions, 0 deletions