From 5e632554d9bf7ea48783702ea59585639e1797bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 10 Mar 2016 20:53:47 +0100 Subject: view: clean up API functions related to primary cursor handling The currently visible display port is always adjusted in a way that the primary cursor is visible. --- view.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'view.h') diff --git a/view.h b/view.h index 7119e56..f33f1a8 100644 --- a/view.h +++ b/view.h @@ -128,12 +128,14 @@ void view_cursors_dispose(Cursor*); /* only keep the main cursor, release all others together with their * selections (if any) */ void view_cursors_clear(View*); -/* get the main cursor which is always in the visible viewport */ -Cursor *view_cursor(View*); /* get the first cursor */ Cursor *view_cursors(View*); +/* get other cursors, no ordering is guaranteed */ Cursor *view_cursors_prev(Cursor*); Cursor *view_cursors_next(Cursor*); +/* get the primary cursor which is always in the visible viewport */ +Cursor *view_cursors_primary_get(View*); +void view_cursors_primary_set(Cursor*); /* get current position of cursor in bytes from the start of the file */ size_t view_cursors_pos(Cursor*); /* get/set zero based index of cell on which cursor currently resides, -- cgit v1.2.3