diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-04-13 17:05:56 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-04-13 17:05:56 +0200 |
| commit | 0ab78db2cf8ca04c9b882f7b572819c8f34323ae (patch) | |
| tree | 6aca810fc57575349951738bcaa6446e37b9486c /view.h | |
| parent | 592dc705e07083b1e9763042101a3a3c65c2e609 (diff) | |
| download | vis-0ab78db2cf8ca04c9b882f7b572819c8f34323ae.tar.gz vis-0ab78db2cf8ca04c9b882f7b572819c8f34323ae.tar.xz | |
view: add view_cursors_new_force function
To create a cursor even if there already exists one at the same
position. Should only be used if all but one of the cursors will
later be removed.
Diffstat (limited to 'view.h')
| -rw-r--r-- | view.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -119,8 +119,13 @@ void view_scroll_to(View*, size_t pos); * position is visible. if the position is in the middle of a line, try to * adjust the viewport in such a way that the whole line is displayed */ void view_cursor_to(View*, size_t pos); -/* create a new cursor, at given position */ +/* create a new cursor at given position, fails if there already + * exists a cursor at the same position */ Cursor *view_cursors_new(View*, size_t pos); +/* create a new cursor even if there already is one located at the + * same position, this should only be used if the one of the two + * cursors will later be disposed */ +Cursor *view_cursors_new_force(View*, size_t pos); /* get number of active cursors */ int view_cursors_count(View*); /* get index/relative order at time of creation of a cursor [0,count-1] */ |
