From b6f349e81003e970992d48248f65354cba283c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 13 Jun 2017 15:32:29 +0200 Subject: vis: normalize selections after motions Merge overlapping selections. Fix #582 --- vis.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'vis.c') diff --git a/vis.c b/vis.c index cd22e4d..df29941 100644 --- a/vis.c +++ b/vis.c @@ -984,10 +984,14 @@ void vis_do(Vis *vis) { if (vis->mode->visual) view_selections_save(sel); view_cursors_to(sel, pos); + if (vis->mode->visual) + view_selection_clear(sel); } } } + view_selections_normalize(view); + if (a->op) { if (a->op == &vis_operators[VIS_OP_YANK] || -- cgit v1.2.3