aboutsummaryrefslogtreecommitdiff
path: root/shell/ash_test/ash-vars/unset.right
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2021-02-01 11:54:15 +0000
committerDenys Vlasenko <vda.linux@googlemail.com>2021-02-02 14:41:55 +0100
commit5bef6781fa434bd65558cefe950f670df34fea4e (patch)
tree4957968c32ac7b8ca32497d95e5e1ee57f39cca7 /shell/ash_test/ash-vars/unset.right
parentbcf91d276047910538c5de0a45f3a4645e3ff471 (diff)
downloadbusybox-5bef6781fa434bd65558cefe950f670df34fea4e.tar.gz
vi: fix range selection by forward character motion
Selection of ranges for change/delete/yank by forward character motion commands (SPACE or 'l') was incorrect. The range was always one character whereas vi allows the size of the range to be specified. Fix this by executing the motion command the required number of times. There is a complication when the range is at the end of a line. We need to distinguish between a range which excludes the last character and one which includes it. This requires comparing the actual range with that expected from the command count. (With the additional quirk that a command count of zero is equivalent to a command count of one.) function old new delta find_range 587 619 +32 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/0 up/down: 32/0) Total: 32 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash_test/ash-vars/unset.right')
0 files changed, 0 insertions, 0 deletions