multiprogress.c: Fix `split_string' to overestimate.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 25 Mar 2022 01:12:56 +0000 (01:12 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 25 Mar 2022 18:51:48 +0000 (18:51 +0000)
commit12badb9a44b61ecf7491ce825a3278f8ebc6653c
treea559d4a53a9e125f124687a7069846f6c4e863e0
parentbe805677f5dccd3643a82aad9f90f756cedddf72
multiprogress.c: Fix `split_string' to overestimate.

Doing the right thing in `advance_measure' is much harder if
`split_string' sometimes falls short of the requested bound because of
wide characters.  On the other hand, overestimating is a little tricky
because we must remember to include all of the following zero-
width (e.g., combining) characters or the prefix will just be wrong.
But it's better to do this than come up with some kludge to make
`advance_measure' sometimes advance the state even when we've not
actually reached the right position.
multiprogress.c