tweaks: reshuffle a condition, for compactness
parent
2b6924ef6e
commit
3d8cd65b1b
|
@ -2823,6 +2823,8 @@ int update_softwrapped_line(linestruct *line)
|
||||||
/* The end column of the current chunk. */
|
/* The end column of the current chunk. */
|
||||||
char *converted;
|
char *converted;
|
||||||
/* The data of the chunk with tabs and control characters expanded. */
|
/* The data of the chunk with tabs and control characters expanded. */
|
||||||
|
bool end_of_line = FALSE;
|
||||||
|
/* Becomes TRUE when the last chunk of the line has been reached. */
|
||||||
|
|
||||||
if (line == openfile->edittop)
|
if (line == openfile->edittop)
|
||||||
from_col = openfile->firstcolumn;
|
from_col = openfile->firstcolumn;
|
||||||
|
@ -2844,9 +2846,7 @@ int update_softwrapped_line(linestruct *line)
|
||||||
|
|
||||||
starting_row = row;
|
starting_row = row;
|
||||||
|
|
||||||
while (row < editwinrows) {
|
while (!end_of_line && row < editwinrows) {
|
||||||
bool end_of_line = FALSE;
|
|
||||||
|
|
||||||
to_col = get_softwrap_breakpoint(line->data, from_col, &end_of_line);
|
to_col = get_softwrap_breakpoint(line->data, from_col, &end_of_line);
|
||||||
|
|
||||||
sequel_column = (end_of_line) ? 0 : to_col;
|
sequel_column = (end_of_line) ? 0 : to_col;
|
||||||
|
@ -2857,9 +2857,6 @@ int update_softwrapped_line(linestruct *line)
|
||||||
draw_row(row++, converted, line, from_col);
|
draw_row(row++, converted, line, from_col);
|
||||||
free(converted);
|
free(converted);
|
||||||
|
|
||||||
if (end_of_line)
|
|
||||||
break;
|
|
||||||
|
|
||||||
from_col = to_col;
|
from_col = to_col;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue