From 5d54271403b1a90ed7ef81894ea0ff91d7a8c5f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 13 Jan 2016 14:22:36 +0100 Subject: view: introduce view_selection_get It returns the range covered by the selection of the primary cursor. --- view.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'view.h') diff --git a/view.h b/view.h index 1f3bae1..05ada2f 100644 --- a/view.h +++ b/view.h @@ -109,6 +109,8 @@ int view_colorcolumn_get(View*); CursorPos view_cursor_getpos(View*); /* get main cursor position in bytes from start of the file */ size_t view_cursor_get(View*); +/* get selection associated with primary cursor */ +Filerange view_selection_get(View*); /* moves window viewport in direction until pos is visible. should only be * used for short distances between current cursor position and destination */ void view_scroll_to(View*, size_t pos); -- cgit v1.2.3