25d2592640
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> |
||
---|---|---|
.. | ||
awk.c | ||
cmp.c | ||
Config.src | ||
diff.c | ||
ed.c | ||
Kbuild.src | ||
patch_bbox.c | ||
patch_toybox.c | ||
patch.c | ||
sed1line.txt | ||
sed_summary.htm | ||
sed.c | ||
vi.c |