Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix quadratic runtime when linebreaking strings without newlines
The problem was that every line would iterate from current line start position to the end of the string, looking for a newline to break on, leading to accidentally quadratic runtime. With this change, the code only ever searches up to the current line's length and not more. Credit to @jorgenpt for the fix suggestion. Closes #2315
- Loading branch information