diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-06-12 17:26:22 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-06-15 15:51:42 +0200 |
| commit | 318837f379d848a0ee431d25c15033a251433a33 (patch) | |
| tree | c35a5f90c2e9754865a038ed63b944579769135d /main.c | |
| parent | 2fa1bea119b211b306281bc3688dee7af7889169 (diff) | |
| download | vis-318837f379d848a0ee431d25c15033a251433a33.tar.gz vis-318837f379d848a0ee431d25c15033a251433a33.tar.xz | |
view: remove view_cursors_multiple
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 12 |
1 files changed, 6 insertions, 6 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_multiple(view)) + if (view_cursors_count(view) > 1) view_cursors_clear(view); else view_cursors_selection_clear(view_cursors_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_multiple(view)) { + if (view_cursors_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_multiple(view)) { + if (view_cursors_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_multiple(view)) + if (view_cursors_count(view) == 1) return wscroll(vis, keys, arg); Cursor *c = view_cursors_primary_get(view); VisCountIterator it = vis_count_iterator_get(vis, 1); @@ -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_multiple(view)) + if (view_cursors_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_multiple(view)) + if (view_cursors_count(view) == 1) view_cursor_to(view, pos); /* redraw all windows in case some display the same file */ vis_draw(vis); |
