There was a subtle bug in trimTextMid caused by calling substring methods with non-integer values. This happens because findValueBisect returns non-integer values, and there was no special handling of this.
The bug results in strings cutting off many of the last few characters in a string, rather than always displaying it when possible.
coverage: 42.978%. remained the same when pulling b2be6d60f13fc1f0610e4135cca5e7402c22838f on jlfwong/fix-trimTextMid into 693545b77abed8c135c8a90c3ab1d4e7d77d654d on main.
There was a subtle bug in
trimTextMid
caused by calling substring methods with non-integer values. This happens becausefindValueBisect
returns non-integer values, and there was no special handling of this.The bug results in strings cutting off many of the last few characters in a string, rather than always displaying it when possible.
Before:
After:
Fixes #411