f277c9eebb
Commit ac6495f6f (vi: allow ctrl-D to reduce indentation) treated ctrl-D during autoindent as a backspace. This was adequate for indentation using tabs but doesn't work well with the expandtab option. In the latter case it's necessary to backspace over all the spaces. Make ctrl-D work correctly when spaces are present in the indent. Also, make it behave more like vim: - ctrl-D is independent of autoindent; - indentation is reduced even when the cursor isn't positioned at the end of the indent. function old new delta char_insert 679 717 +38 get_column - 37 +37 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/0 up/down: 75/0) Total: 75 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>