tweaks: add an extra variable, to avoid reusing one for another purpose

This commit is contained in:
Benno Schulenberg 2023-12-08 16:12:17 +01:00
parent a76a6bf692
commit 9bf966af37
1 changed files with 5 additions and 4 deletions

View File

@ -3167,12 +3167,13 @@ size_t get_softwrap_breakpoint(const char *linedata, size_t leftedge,
/* If we're softwrapping at blanks and we found at least one blank, break
* after that blank -- if it doesn't overshoot the screen's edge. */
if (farthest_blank != NULL) {
size_t onestep = advance_over(farthest_blank, &last_blank_col);
size_t aftertheblank = last_blank_col;
size_t onestep = advance_over(farthest_blank, &aftertheblank);
if (last_blank_col <= goal_column) {
if (aftertheblank <= goal_column) {
text = farthest_blank + onestep;
column = last_blank_col;
return last_blank_col;
column = aftertheblank;
return aftertheblank;
}
/* If it's a tab that overshoots, break at the screen's edge. */