tweaks: don't loop over an initializer
parent
54e4505b2f
commit
873e3d6fa6
13
src/winio.c
13
src/winio.c
|
@ -2914,16 +2914,17 @@ void edit_scroll(scroll_dir direction, int nrows)
|
||||||
if (direction == DOWNWARD)
|
if (direction == DOWNWARD)
|
||||||
go_forward_chunks(editwinrows - nrows, &line, &leftedge);
|
go_forward_chunks(editwinrows - nrows, &line, &leftedge);
|
||||||
|
|
||||||
/* Draw new content on the blank rows inside the scrolled region
|
|
||||||
* (and on the bordering row too when it was deemed necessary). */
|
|
||||||
i = nrows;
|
i = nrows;
|
||||||
while (i > 0 && line != NULL) {
|
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
/* If the first blank row is in the middle of a softwrapped line,
|
/* Compensate for the earlier onscreen chunks of a softwrapped line
|
||||||
* compensate for the earlier onscreen chunks of that line. */
|
* when the first blank row happens to be in the middle of that line. */
|
||||||
if (ISSET(SOFTWRAP) && i == nrows && line != openfile->edittop)
|
if (ISSET(SOFTWRAP) && line != openfile->edittop)
|
||||||
i += leftedge / editwincols;
|
i += leftedge / editwincols;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Draw new content on the blank rows inside the scrolled region
|
||||||
|
* (and on the bordering row too when it was deemed necessary). */
|
||||||
|
while (i > 0 && line != NULL) {
|
||||||
i -= update_line(line, (line == openfile->current) ?
|
i -= update_line(line, (line == openfile->current) ?
|
||||||
openfile->current_x : 0);
|
openfile->current_x : 0);
|
||||||
line = line->next;
|
line = line->next;
|
||||||
|
|
Loading…
Reference in New Issue