Commit f08d169a authored by David Lawrence Ramsey's avatar David Lawrence Ramsey Committed by Benno Schulenberg
Browse files

softwrap: make sure char_len is set when a tab is wider than a chunk

This fixes https://savannah.gnu.org/bugs/?51770,
and fixes https://savannah.gnu.org/bugs/?51768

.
Reported-by: default avatarDavid Lawrence Ramsey <pooka109@gmail.com>
parent cf14ee2e
Showing with 4 additions and 2 deletions
+4 -2
......@@ -3000,8 +3000,10 @@ size_t get_softwrap_breakpoint(const char *text, size_t leftedge,
int char_len = 0;
/* Length of current character, in bytes. */
while (*text != '\0' && column < leftedge)
text += parse_mbchar(text, NULL, &column);
while (*text != '\0' && column < leftedge) {
char_len = parse_mbchar(text, NULL, &column);
text += char_len;
}
/* The intention is to use the entire available width. */
goal_column = leftedge + editwincols;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment