Avoid unnecessarily breaking inside words when using continued

`continued` is implemented by temporarily shortening the lineWidth,
which can cause the linewrapper to break inside words when that's not
really necessary.
This commit is contained in:
Edward Faulkner 2014-09-12 15:11:56 -04:00
parent 3842f6b7da
commit 1a5df016ce

View File

@ -64,7 +64,7 @@ class LineWrapper extends EventEmitter
# if the word is longer than the whole line, chop it up
# TODO: break by grapheme clusters, not JS string characters
if w > @lineWidth
if w > @lineWidth + @continuedX
# make some fake break objects
lbk = last
fbk = {}