diff options
author | Ron Yorston | 2021-06-16 14:47:00 +0100 |
---|---|---|
committer | Denys Vlasenko | 2021-06-16 23:53:03 +0200 |
commit | 038d4007092f6d0d2dc107f31397c57e62751717 (patch) | |
tree | f77d354026e4aefb9f7362e43e8aca5a3d4fbf0d /scripts/Makefile.IMA | |
parent | ac04eb3657f99f6952971d8ceb8a82d73b783de8 (diff) | |
download | busybox-038d4007092f6d0d2dc107f31397c57e62751717.zip busybox-038d4007092f6d0d2dc107f31397c57e62751717.tar.gz |
vi: reject change command when motion fails
If the motion command used to define the range of a change, yank or
delete fails the whole command should be rejected. BusyBox vi already
handled failed searches in these circumstances. Add some more cases:
- non-existent mark: d'x
- movement beyond end of file: c99999+ or 99999<<
This is implemented using a global variable which is set when a command
error is detected. Unlike the case of motion within a line it's
insufficient to check that the motion command doesn't move the cursor:
this fails to process 'LyL' correctly, for example, as the second 'L'
doesn't move the cursor.
function old new delta
indicate_error 75 82 +7
find_range 686 692 +6
do_cmd 4851 4852 +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 14/0) Total: 14 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'scripts/Makefile.IMA')
0 files changed, 0 insertions, 0 deletions