vis
a vi-like editor based on Plan 9's structural regular expressions
git clone https://9o.is/git/vis.git
commit 7f0f85b67033207cb4533f7ac48f2c674b02db26 parent f84cddc3f8693d8e9e0d3f3a360b9f0e57016f13 Author: Marc André Tanner <mat@brain-dump.org> Date: Mon, 27 Feb 2017 13:12:13 +0100 view: reposition cursor after restoring selection This should fix selection changes after shift operators in visual mode. The problem was that the NOP motion which is executed when switching back into visual-line mode destroys the selection if the cursor is not already placed on a selection boundary. Fix #501 Diffstat:
| M | view.c | | | 1 | + |
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/view.c b/view.c @@ -1265,6 +1265,7 @@ void view_cursors_selection_restore(Cursor *c) { ); if (!text_range_valid(&sel)) return; + view_cursors_to(c, sel.end); sel.end = text_char_next(txt, sel.end); if (!(c->sel = view_selections_new(c->view, c))) return;