It's no Knuth-Plass, but standard library code is much nicer than implementing something.
Stop forcing word-wrap off, now it's functioning.