Optimize loop comparison

This commit is contained in:
Arun Prakash Jana 2021-05-14 12:35:43 +05:30
parent 1fabac27ba
commit 513b4f24a6
No known key found for this signature in database
GPG Key ID: A75979F35C080412
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}