vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit d42ed7db2d53fe0b9435782fa7eb9f3b0923164a parent a9d7a730c319d4ff00b9feddfc0237b3e25f47a8 Author: ale rimoldi <ale.comp_06@xox.ch> Date: Sat, 18 Oct 2014 12:14:57 +0200 Place cursor after inserted text when pasting a register Diffstat:
| M | vis.c | | | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/vis.c b/vis.c @@ -921,7 +921,9 @@ static void delete(const Arg *arg) { static void insert_register(const Arg *arg) { Register *reg = &vis->registers[arg->i]; - editor_insert(vis, window_cursor_get(vis->win->win), reg->data, reg->len); + int pos = window_cursor_get(vis->win->win); + editor_insert(vis, pos, reg->data, reg->len); + window_cursor_to(vis->win->win, pos + reg->len); } static void prompt(const Arg *arg) {