From 1c8990a329fabf3cf4ab790a61ee86c35391c042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 3 May 2017 17:32:14 +0200 Subject: text: remove count argument from text_{earlier,later} --- main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'main.c') 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 */ -- cgit v1.2.3