diff --git a/src/winio.c b/src/winio.c index 4a605393..87dda1ba 100644 --- a/src/winio.c +++ b/src/winio.c @@ -3015,10 +3015,12 @@ size_t get_softwrap_breakpoint(const char *text, size_t leftedge, index += char_len; } + if (*text == '\0') + *end_of_line = TRUE; + /* If the text displays within goal_column, we've reached the end of the * line, and we're done. */ if (column <= goal_column) { - *end_of_line = TRUE; return column; }