diff options
author | Ron Yorston | 2021-06-16 14:46:01 +0100 |
---|---|---|
committer | Denys Vlasenko | 2021-06-16 23:53:03 +0200 |
commit | ac04eb3657f99f6952971d8ceb8a82d73b783de8 (patch) | |
tree | ba7cf6b16960129600aafe9288657e75bb9f96b8 /modutils/modinfo.c | |
parent | f1d21b743485defb39fada03b27878efb1e2f7e3 (diff) | |
download | busybox-ac04eb3657f99f6952971d8ceb8a82d73b783de8.zip busybox-ac04eb3657f99f6952971d8ceb8a82d73b783de8.tar.gz |
vi: up/down motion beyond end of file should fail
In traditional vi and vim line motion commands ('+'/'-'/'j'/'k')
fail if the movement would exceed the bounds of the file. BusyBox vi
allowed such commands to succeed, leaving the cursor on the first or
last character of the file.
Make BusyBox vi work like vi/vim.
For the 'G'/'H'/'L' commands traditional vi treats an out of bounds
result as an error, vim doesn't. BusyBox vi behaves like vim, both
before and after this patch.
function old new delta
do_cmd 4785 4851 +66
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 66/0) Total: 66 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'modutils/modinfo.c')
0 files changed, 0 insertions, 0 deletions