Previously a line that was too long but didn't contain spaces would cause an infinite loop and hang Blender. Now we just hard-break each line when there are no spaces to be found. The result of word_wrap() is now also cached, so that redraws are more efficient.