mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Optimize loop comparison
This commit is contained in:
parent
1fabac27ba
commit
513b4f24a6
|
@ -5891,8 +5891,10 @@ static void redraw(char *path)
|
||||||
g_state.dircolor = 1;
|
g_state.dircolor = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onscreen = MIN(onscreen + curscroll, ndents);
|
||||||
|
|
||||||
/* Print listing */
|
/* Print listing */
|
||||||
for (i = curscroll; i < ndents && i < curscroll + onscreen; ++i) {
|
for (i = curscroll; i < onscreen; ++i) {
|
||||||
move(++j, 0);
|
move(++j, 0);
|
||||||
printent(&pdents[i], ncols, i == cur);
|
printent(&pdents[i], ncols, i == cur);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue