diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2014-10-25 11:01:29 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2014-10-25 11:01:29 +0200 |
| commit | 1b55dc64b529ceab804a87649a55714fb2ff5973 (patch) | |
| tree | 6f5e17e41433aa6cbe14ddcfd9b1cf33103a4903 | |
| parent | ec539160c5cf40f68e6697e9affb009e9759c64d (diff) | |
| download | vis-1b55dc64b529ceab804a87649a55714fb2ff5973.tar.gz vis-1b55dc64b529ceab804a87649a55714fb2ff5973.tar.xz | |
Set MARK_SELECTION_{START,END} in visual mode
| -rw-r--r-- | window.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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; } |
