vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 5254dceb7154bce7d505552a54c027a1be267bbc
parent 4600daa76884936fa344d75a7e680dc2636ee104
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Sun,  7 Aug 2016 11:24:45 +0200

sam: do not change cursor position after :! command

Fixes #364

Diffstat:
Msam.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sam.c b/sam.c @@ -1169,7 +1169,7 @@ static bool cmd_filter(Vis *vis, Win *win, Command *cmd, const char *argv[], Cur } static bool cmd_launch(Vis *vis, Win *win, Command *cmd, const char *argv[], Cursor *cur, Filerange *range) { - Filerange empty = text_range_new(range->start, EPOS); + Filerange empty = text_range_new(cur ? view_cursors_pos(cur) : range->start, EPOS); return cmd_filter(vis, win, cmd, argv, cur, &empty); }