From e632cfd8f967a37bae1ca7850eb9122b69d41748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sun, 7 Aug 2016 11:24:45 +0200 Subject: sam: do not change cursor position after :! command Fixes #364 --- sam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sam.c') diff --git a/sam.c b/sam.c index 173aa50..919bf2f 100644 --- 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); } -- cgit v1.2.3