diff options
author | Ron Yorston | 2021-03-25 14:23:36 +0000 |
---|---|---|
committer | Denys Vlasenko | 2021-03-29 12:05:53 +0200 |
commit | 25d259264019e4171eddde570271a82b6dd0f79a (patch) | |
tree | 0d0e45744826109213c809e92b723a4c315541cc /make_single_applets.sh | |
parent | 776b56d774fec51e0ac3f9714adbdb2375c6bda7 (diff) | |
download | busybox-25d259264019e4171eddde570271a82b6dd0f79a.zip busybox-25d259264019e4171eddde570271a82b6dd0f79a.tar.gz |
vi: make buffer handling more vi-like
Vi places text affected by change/delete/yank operations into a
buffer. The contents of such buffers can be restored with the put
commands, 'p' or 'P'. These behave differently depending on whether
the buffer contains whole lines or partial lines. For whole lines
the text is copied into the file on the line before (P) or after
(p) the current line. For partial lines the text is copied before
or after the current cursor position.
Whether an operation results in whole or partial lines depends on
the command used.
BusyBox vi treats any buffer with a newline as though it contained
whole lines. This is incorrect. Deleting multiple words across
a line boundary results in a buffer with a newline but not having
whole lines.
Rework how buffers are handled to behave more like vi.
function old new delta
static.text_yank 79 99 +20
colon 3092 3097 +5
edit_file 885 887 +2
yank_delete 127 112 -15
.rodata 105139 105101 -38
find_range 514 467 -47
do_cmd 5088 4842 -246
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/4 up/down: 27/-346) Total: -319 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'make_single_applets.sh')
0 files changed, 0 insertions, 0 deletions