From: Jason Woofenden Date: Thu, 31 Jan 2013 04:53:49 +0000 (-0500) Subject: don't wrap after printing in last cell X-Git-Tag: v1.0~24 X-Git-Url: https://jasonwoof.com/gitweb/?p=watch-my-terminal.git;a=commitdiff_plain;h=639264f34589d0637860ffbd47d788e03c48c76a don't wrap after printing in last cell --- diff --git a/terminal.coffee b/terminal.coffee index 37d3971..19296bf 100644 --- a/terminal.coffee +++ b/terminal.coffee @@ -92,11 +92,11 @@ class Terminal when '\x0a', '\x0b' # lf, vertical tab (same thing) @wrap_to_next_line() else + if @x >= @width + @wrap_to_next_line() @text[@y][@x] = c @attributes[@y][@x] = @a @x += 1 - if @x is @width - @wrap_to_next_line() return set_attribute_bits: (mask, value) ->