diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-06-12 18:26:59 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-06-15 15:51:43 +0200 |
| commit | a91e705dfd9b7358bf24e02312dfb06ab3e6848d (patch) | |
| tree | 28c25cdf44b19d56b47447be4fa1991d09424482 /main.c | |
| parent | 9e0c192423a165e735441279e0ee6af7cb0353ef (diff) | |
| download | vis-a91e705dfd9b7358bf24e02312dfb06ab3e6848d.tar.gz vis-a91e705dfd9b7358bf24e02312dfb06ab3e6848d.tar.xz | |
view: rename view_cursors_count
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1345,7 +1345,7 @@ static const char *cursors_align_indent(Vis *vis, const char *keys, const Arg *a static const char *cursors_clear(Vis *vis, const char *keys, const Arg *arg) { View *view = vis_view(vis); - if (view_cursors_count(view) > 1) + if (view_selections_count(view) > 1) view_selections_dispose_all(view); else view_selection_clear(view_selections_primary_get(view)); @@ -1422,7 +1422,7 @@ static const char *cursors_remove_column(Vis *vis, const char *keys, const Arg * int column = vis_count_get_default(vis, arg->i) - 1; if (column >= max) column = max - 1; - if (view_cursors_count(view) == 1) { + if (view_selections_count(view) == 1) { vis_mode_switch(vis, VIS_MODE_NORMAL); return keys; } @@ -1442,7 +1442,7 @@ static const char *cursors_remove_column_except(Vis *vis, const char *keys, cons int column = vis_count_get_default(vis, arg->i) - 1; if (column >= max) column = max - 1; - if (view_cursors_count(view) == 1) { + if (view_selections_count(view) == 1) { vis_redraw(vis); return keys; } @@ -1463,7 +1463,7 @@ static const char *cursors_remove_column_except(Vis *vis, const char *keys, cons static const char *cursors_navigate(Vis *vis, const char *keys, const Arg *arg) { View *view = vis_view(vis); - if (view_cursors_count(view) == 1) + if (view_selections_count(view) == 1) return wscroll(vis, keys, arg); Cursor *c = view_selections_primary_get(view); VisCountIterator it = vis_count_iterator_get(vis, 1); @@ -1498,7 +1498,7 @@ static const char *selections_rotate(Vis *vis, const char *keys, const Arg *arg) Text *txt = vis_text(vis); View *view = vis_view(vis); int columns = view_cursors_column_count(view); - int selections = columns == 1 ? view_cursors_count(view) : columns; + int selections = columns == 1 ? view_selections_count(view) : columns; int count = vis_count_get_default(vis, 1); array_init_sized(&arr, sizeof(Rotate)); if (!array_reserve(&arr, selections)) @@ -1710,7 +1710,7 @@ static const char *undo(Vis *vis, const char *keys, const Arg *arg) { size_t pos = text_undo(vis_text(vis)); if (pos != EPOS) { View *view = vis_view(vis); - if (view_cursors_count(view) == 1) + if (view_selections_count(view) == 1) view_cursor_to(view, pos); /* redraw all windows in case some display the same file */ vis_draw(vis); @@ -1722,7 +1722,7 @@ static const char *redo(Vis *vis, const char *keys, const Arg *arg) { size_t pos = text_redo(vis_text(vis)); if (pos != EPOS) { View *view = vis_view(vis); - if (view_cursors_count(view) == 1) + if (view_selections_count(view) == 1) view_cursor_to(view, pos); /* redraw all windows in case some display the same file */ vis_draw(vis); |
