nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 513b4f24a69ae53ee68053e50c701fe93b5593e4
parent 1fabac27ba87e32ee79036a1e9a55b42b7d1dfa4
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Fri, 14 May 2021 12:35:43 +0530

Optimize loop comparison

Diffstat:
Msrc/nnn.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/nnn.c b/src/nnn.c @@ -5891,8 +5891,10 @@ static void redraw(char *path) g_state.dircolor = 1; } + onscreen = MIN(onscreen + curscroll, ndents); + /* Print listing */ - for (i = curscroll; i < ndents && i < curscroll + onscreen; ++i) { + for (i = curscroll; i < onscreen; ++i) { move(++j, 0); printent(&pdents[i], ncols, i == cur); }