vis

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

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

commit bb0cc3099871cd975a83754b7cd2b38ae7074847
parent bb03c374ed91135fe428a2b7a9276578a01d4951
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Sat, 25 Oct 2014 11:01:29 +0200

Set MARK_SELECTION_{START,END} in visual mode

Diffstat:
Mwindow.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/window.c b/window.c @@ -20,6 +20,7 @@ #include <errno.h> #include <regex.h> #include <curses.h> +#include "editor.h" #include "window.h" #include "syntax.h" #include "text.h" @@ -133,6 +134,8 @@ Filerange window_selection_get(Win *win) { if (!text_range_valid(&sel)) return text_range_empty(); sel.end = text_char_next(win->text, sel.end); + text_mark_set(win->text, MARK_SELECTION_START, sel.start); + text_mark_set(win->text, MARK_SELECTION_END, sel.end); return sel; }