From 1954d5ef9219b5c3c8ba757b0936118fe265d13b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Fri, 27 Nov 2015 13:57:01 +0100 Subject: vis: improve cursor alignment command --- view.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'view.h') diff --git a/view.h b/view.h index d650ec6..cbed355 100644 --- a/view.h +++ b/view.h @@ -136,6 +136,10 @@ Cursor *view_cursors_prev(Cursor*); Cursor *view_cursors_next(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, + * -1 if cursor is currently not visible */ +int view_cursors_cell_get(Cursor*); +int view_cursors_cell_set(Cursor*, int cell); /* place cursor at `pos' which should be in the interval [0, text-size] */ void view_cursors_to(Cursor*, size_t pos); void view_cursors_scroll_to(Cursor*, size_t pos); -- cgit v1.2.3