mirror of
git://git.sv.gnu.org/nano.git
synced 2025-02-14 04:14:16 +03:00
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.
This commit is contained in:
parent
ec4883b6a9
commit
3ce74eb8fe
@ -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. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user