d9d19896a9
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>