diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-03-10 20:53:47 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-03-10 22:36:54 +0100 |
| commit | 5e632554d9bf7ea48783702ea59585639e1797bf (patch) | |
| tree | 5691f504dd0c9974d1579469094a9c1fc2b24967 /main.c | |
| parent | 5f8760a614e11dc2f665ed4a23309875a6af61df (diff) | |
| download | vis-5e632554d9bf7ea48783702ea59585639e1797bf.tar.gz vis-5e632554d9bf7ea48783702ea59585639e1797bf.tar.xz | |
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.
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1242,7 +1242,7 @@ static const char *cursors_clear(Vis *vis, const char *keys, const Arg *arg) { if (view_cursors_count(view) > 1) view_cursors_clear(view); else - view_cursors_selection_clear(view_cursor(view)); + view_cursors_selection_clear(view_cursors_primary_get(view)); return keys; } @@ -1264,7 +1264,7 @@ static const char *cursors_select(Vis *vis, const char *keys, const Arg *arg) { static const char *cursors_select_next(Vis *vis, const char *keys, const Arg *arg) { Text *txt = vis_text(vis); View *view = vis_view(vis); - Cursor *cursor = view_cursor(view); + Cursor *cursor = view_cursors_primary_get(view); Filerange sel = view_cursors_selection_get(cursor); if (!text_range_valid(&sel)) return keys; @@ -1287,16 +1287,16 @@ static const char *cursors_select_next(Vis *vis, const char *keys, const Arg *ar static const char *cursors_select_skip(Vis *vis, const char *keys, const Arg *arg) { View *view = vis_view(vis); - Cursor *cursor = view_cursor(view); + Cursor *cursor = view_cursors_primary_get(view); keys = cursors_select_next(vis, keys, arg); - if (cursor != view_cursor(view)) + if (cursor != view_cursors_primary_get(view)) view_cursors_dispose(cursor); return keys; } static const char *cursors_remove(Vis *vis, const char *keys, const Arg *arg) { View *view = vis_view(vis); - view_cursors_dispose(view_cursor(view)); + view_cursors_dispose(view_cursors_primary_get(view)); view_cursor_to(view, view_cursor_get(view)); return keys; } |
