wrapping: compute the width of a succeeding line in the correct manner

Its number of columns needs to be computed, not its number of bytes.
master
Benno Schulenberg 2019-04-21 11:35:25 +02:00
parent ec4883b6a9
commit 3ce74eb8fe
1 changed files with 1 additions and 1 deletions

View File

@ -1466,7 +1466,7 @@ bool do_wrap(void)
/* We prepend the wrapped text to the next line, if the prepend_wrap
* flag is set, there is a next line, and prepending would not make
* the line too long. */
if (prepend_wrap && rest_length + strlen(line->next->data) <= wrap_at) {
if (prepend_wrap && rest_length + strlenpt(line->next->data) <= wrap_at) {
const char *tail = remainder + move_mbleft(remainder, rest_length);
/* Go to the end of the line. */