From 1b70211a26bcae1e26b17c8ed6b1d8f25e40d0a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 1 Feb 2017 17:57:54 +0100 Subject: vis: fix repetition of O when given a count The cursor needs to be adjusted after every insertion, not just the first one. The implementation is currently rather ugly because it clobbers the dot register with pseudo keys. --- main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.c b/main.c index 15a2079..100862c 100644 --- a/main.c +++ b/main.c @@ -1979,8 +1979,10 @@ static const char *openline(Vis *vis, const char *keys, const Arg *arg) { } else { if (vis_get_autoindent(vis)) { vis_motion(vis, VIS_MOVE_LINE_START); + vis_keys_feed(vis, ""); } else { vis_motion(vis, VIS_MOVE_LINE_BEGIN); + vis_keys_feed(vis, ""); } vis_keys_feed(vis, ""); } -- cgit v1.2.3