From 1d98020b6268d8ce0368c93a1146c0f807fe6288 Mon Sep 17 00:00:00 2001 From: anon Date: Tue, 5 Sep 2023 19:09:19 +0200 Subject: [PATCH] repurpose "nextline" --- src/display.c | 3 ++- src/find.c | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/display.c b/src/display.c index 18b7901..670db61 100644 --- a/src/display.c +++ b/src/display.c @@ -378,6 +378,7 @@ static inline void display_results() { char linenum[NUMLEN + 1]; /* line number */ werase(wresult); + nextline = 1; /* --- Display the message --- */ if(totallines == 0) { // Its a real message @@ -559,7 +560,7 @@ static inline void display_results() { /* if this is the first displayed line, display what will fit on the screen */ - if(topref == nextline - 1) { + if(topref == (nextline-1)) { disprefs++; /* break out of two loops */ goto endrefs; diff --git a/src/find.c b/src/find.c index dbe4e65..16cd128 100644 --- a/src/find.c +++ b/src/find.c @@ -1278,7 +1278,6 @@ bool search(const char *query) { cannotopen(temp1); return (false); } - nextline = 1; totallines = 0; disprefs = 0;