From 007ff80b477880e820d08391b96ca2a00889082e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sat, 28 Jan 2017 14:16:04 +0100 Subject: vis: deindent blank autoindented lines when leaving insert mode Does not work for the current implementation of `O` because the "lookbehind" i.e. second to last processed key is `` and not ``. Fix #383 --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 046e90c..15a2079 100644 --- a/main.c +++ b/main.c @@ -1975,14 +1975,14 @@ static const char *openline(Vis *vis, const char *keys, const Arg *arg) { vis_operator(vis, VIS_OP_MODESWITCH, VIS_MODE_INSERT); if (arg->i > 0) { vis_motion(vis, VIS_MOVE_LINE_END); - vis_keys_feed(vis, ""); + vis_keys_feed(vis, ""); } else { if (vis_get_autoindent(vis)) { vis_motion(vis, VIS_MOVE_LINE_START); } else { vis_motion(vis, VIS_MOVE_LINE_BEGIN); } - vis_keys_feed(vis, ""); + vis_keys_feed(vis, ""); } return keys; } -- cgit v1.2.3