From 1a5df016ced5977aeb1df8ac11cd1670319b60a8 Mon Sep 17 00:00:00 2001 From: Edward Faulkner Date: Fri, 12 Sep 2014 15:11:56 -0400 Subject: [PATCH] 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. --- lib/line_wrapper.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/line_wrapper.coffee b/lib/line_wrapper.coffee index 3a695e2..9c92196 100644 --- a/lib/line_wrapper.coffee +++ b/lib/line_wrapper.coffee @@ -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 = {}