aboutsummaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'window.c')
-rw-r--r--window.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/window.c b/window.c
index 82178ec..10f2ef4 100644
--- 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;
}