From d032bb195d80a06cfe873353a7242883b423c070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Fri, 18 May 2018 17:12:27 +0200 Subject: sam: normalize selections after command execution As a trivial example if multiple selections exist running a command like :, should merge them. --- sam.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sam.c') diff --git a/sam.c b/sam.c index 852977c..ff820d8 100644 --- a/sam.c +++ b/sam.c @@ -1244,6 +1244,9 @@ enum SamError sam_cmd(Vis *vis, const char *s) { vis_file_snapshot(vis, file); } + for (Win *win = vis->windows; win; win = win->next) + view_selections_normalize(win->view); + if (vis->win) { if (primary_pos != EPOS && view_selection_disposed(vis->win->view)) view_cursor_to(vis->win->view, primary_pos); -- cgit v1.2.3