X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=terminal.coffee;h=174c005bc4ffe1a705e0cf0d575c072af263c87a;hb=9520d776d2663d08c14e955d457a95ae2b50bf63;hp=8b7879b79b51050ff52f32d6b8fcf857b042d229;hpb=6a61f2f69ff4bd74b400e084eb7cbe50e2df227f;p=watch-my-terminal.git diff --git a/terminal.coffee b/terminal.coffee index 8b7879b..174c005 100644 --- a/terminal.coffee +++ b/terminal.coffee @@ -286,7 +286,7 @@ class Terminal if @saved_normal_screen? log "ignoring request to switch to the alt screen because we're already on the alt screen" return - @saved_normal_screen = [@x, @y, @text, @attributes] + @saved_normal_screen = x: @x, y: @y, text: @text, attributes: @attributes @text = [] @attributes = [] for y in [0...@height] @@ -311,10 +311,10 @@ class Terminal if not @saved_normal_screen? log "ignoring request to switch to the normal screen because we're already on the normal screen" return - @x = @saved_normal_screen[0] - @y = @saved_normal_screen[1] - @text = @saved_normal_screen[2] - @attributes = @saved_normal_screen[3] + @x = @saved_normal_screen.x + @y = @saved_normal_screen.y + @text = @saved_normal_screen.text + @attributes = @saved_normal_screen.attributes @saved_normal_screen = null else log "confusing arg for csiq_l: #{arg}" @@ -460,7 +460,7 @@ class Terminal @a = 0 return - # set scrolling region + # set scroll region csi_r: (top, bottom) -> top = -1 + parseInt @fix_esc_arg top, '1' bottom = -1 + parseInt @fix_esc_arg bottom, '10000'