diff options
author | Ron Yorston | 2021-04-15 12:01:34 +0100 |
---|---|---|
committer | Denys Vlasenko | 2021-04-15 13:09:12 +0200 |
commit | d9d19896a9be5b5cf35d00cae61c9d5621044ccf (patch) | |
tree | b819d2c9a741577bb60be19c9ffca4b724aa7126 /networking/hostname.c | |
parent | 9b2a3895eedb3c46179b1ed923b0f1214da04c5b (diff) | |
download | busybox-d9d19896a9be5b5cf35d00cae61c9d5621044ccf.zip busybox-d9d19896a9be5b5cf35d00cae61c9d5621044ccf.tar.gz |
vi: position cursor on last column of tab
Vi places the cursor on the last column of a tab character whereas
BusyBox vi puts it on the first. This is disconcerting for
experienced vi users and makes it impossible to distinguish
visually between an empty line and one containing just a tab.
It wasn't always this way. Prior to commit e3cbfb91d (vi: introduce
FEATURE_VI_8BIT) BusyBox vi also put the cursor on the last column.
However there were problems with cursor positioning when text was
inserted before a tab. Commit eaabf0675 (vi: multiple fixes by
Natanael Copa) includes a partial attempt to fix this. (The code is
still present but it's never executed. Clever compilers optimise it
away.)
Revert the changes of commit e3cbfb91d and fix the insert problem
for all tabs, not just the first.
To quote Natanael: "Costs a few bytes but its worth it imho".
function old new delta
refresh 974 1000 +26
move_to_col 81 83 +2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 28/0) Total: 28 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/hostname.c')
0 files changed, 0 insertions, 0 deletions