From 6c080d01873be2670ecc74b698ac5d73d0acd77f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 23 Sep 2014 22:07:19 +0200 Subject: Implement linewise visual mode --- window.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'window.c') diff --git a/window.c b/window.c index 8a2ad12..716d9e5 100644 --- a/window.c +++ b/window.c @@ -137,6 +137,11 @@ Filerange window_selection_get(Win *win) { return sel; } +void window_selection_set(Win *win, Filerange *sel) { + win->sel = *sel; + window_draw(win); +} + Filerange window_viewport_get(Win *win) { return (Filerange){ .start = win->start, .end = win->end }; } @@ -782,10 +787,6 @@ void window_selection_start(Win *win) { curs_set(0); } -void window_selection_end(Win *win) { - win->sel.end = window_cursor_get(win); -} - void window_syntax_set(Win *win, Syntax *syntax) { win->syntax = syntax; } -- cgit v1.2.3