vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit b63a67299361354961c8457219db9a026b1cdbcf parent cd6641c7d54699652322deb4a2b334872ca54336 Author: Marc André Tanner <mat@brain-dump.org> Date: Wed, 1 Feb 2017 17:57:54 +0100 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. Diffstat:
| M | main.c | | | 2 | ++ |
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git 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>"); }