aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-05-03 17:32:14 +0200
committerMarc André Tanner <mat@brain-dump.org>2017-05-03 17:32:49 +0200
commit1c8990a329fabf3cf4ab790a61ee86c35391c042 (patch)
tree724334396e43c2b3f527773eeb0b3718c152f294 /main.c
parent02c18c23d7eb8e520e8584af183ca9b67937d45d (diff)
downloadvis-1c8990a329fabf3cf4ab790a61ee86c35391c042.tar.gz
vis-1c8990a329fabf3cf4ab790a61ee86c35391c042.tar.xz
text: remove count argument from text_{earlier,later}
Diffstat (limited to 'main.c')
-rw-r--r--main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/main.c b/main.c
index 63d796b..5c9cc9f 100644
--- a/main.c
+++ b/main.c
@@ -1749,7 +1749,10 @@ static const char *redo(Vis *vis, const char *keys, const Arg *arg) {
}
static const char *earlier(Vis *vis, const char *keys, const Arg *arg) {
- size_t pos = text_earlier(vis_text(vis), vis_count_get_default(vis, 1));
+ size_t pos = EPOS;
+ VisCountIterator it = vis_count_iterator_get(vis, 1);
+ while (vis_count_iterator_next(&it))
+ pos = text_earlier(vis_text(vis));
if (pos != EPOS) {
view_cursor_to(vis_view(vis), pos);
/* redraw all windows in case some display the same file */
@@ -1759,7 +1762,10 @@ static const char *earlier(Vis *vis, const char *keys, const Arg *arg) {
}
static const char *later(Vis *vis, const char *keys, const Arg *arg) {
- size_t pos = text_later(vis_text(vis), vis_count_get_default(vis, 1));
+ size_t pos = EPOS;
+ VisCountIterator it = vis_count_iterator_get(vis, 1);
+ while (vis_count_iterator_next(&it))
+ pos = text_later(vis_text(vis));
if (pos != EPOS) {
view_cursor_to(vis_view(vis), pos);
/* redraw all windows in case some display the same file */