From bd49d876cd0a8e8c229a4ee8687b8e1a827c9d92 Mon Sep 17 00:00:00 2001 From: speedie Date: Sat, 24 Jun 2023 17:01:43 +0200 Subject: [PATCH] Move to the first item when setting lines This fixes an issue where you can resize beyond the number of items --- libs/arg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/arg.c b/libs/arg.c index 0bac4c6..3d6529e 100644 --- a/libs/arg.c +++ b/libs/arg.c @@ -442,6 +442,8 @@ void defaultimg(Arg *arg) { void setlines(Arg *arg) { if (!overridelines) return; + sel = curr = matches; + lines += arg->i; if (lines < 0) {