From c650577ecd372c89632f8c2da0909f0b2792b7ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20B=C3=B6hmer?= Date: Thu, 24 Aug 2017 09:28:06 +0200 Subject: [PATCH] Fixed line_wrapper.coffee: (while w > @spaceLeft) did run endless, if space is to tight for even a single character --- 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 a64aa02..d68300a 100644 --- a/lib/line_wrapper.coffee +++ b/lib/line_wrapper.coffee @@ -74,7 +74,7 @@ class LineWrapper extends EventEmitter while word.length # fit as much of the word as possible into the space we have l = word.length - while w > @spaceLeft + while w > @spaceLeft and l > 0 w = @wordWidth word.slice(0, --l) # send a required break unless this is the last piece