vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 27b6636421c3216741a56d95c28395a49de25fc2 parent 52accfae3374a8360e211b282ae4df792da7dada Author: Marc André Tanner <mat@brain-dump.org> Date: Wed, 24 Sep 2014 20:59:57 +0200 Fix cursor position after 'p' Diffstat:
| M | vis.c | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/vis.c b/vis.c @@ -508,8 +508,8 @@ static void op_put(OperatorContext *c) { pos = text_line_begin(txt, pos); } editor_insert(vis, pos, c->reg->data, c->reg->len); - if (c->reg->linewise || c->arg->i > 0) - window_cursor_to(vis->win->win, pos); + if (c->reg->linewise) + window_cursor_to(vis->win->win, text_line_start(txt, pos)); else window_cursor_to(vis->win->win, pos + c->reg->len); }