aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-02-01 17:57:54 +0100
committerMarc André Tanner <mat@brain-dump.org>2017-02-01 17:57:54 +0100
commit1b70211a26bcae1e26b17c8ed6b1d8f25e40d0a6 (patch)
tree57b885931273bb5f6cae214191faae6aa72986d0
parent5d0ac898501bf0e43e221324f974f370e2d86771 (diff)
downloadvis-1b70211a26bcae1e26b17c8ed6b1d8f25e40d0a6.tar.gz
vis-1b70211a26bcae1e26b17c8ed6b1d8f25e40d0a6.tar.xz
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.
-rw-r--r--main.c2
1 files changed, 2 insertions, 0 deletions
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, "<cursor-line-start>");
} else {
vis_motion(vis, VIS_MOVE_LINE_BEGIN);
+ vis_keys_feed(vis, "<cursor-line-begin>");
}
vis_keys_feed(vis, "<Enter><Up>");
}