JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
init: send normal screen too when on alt
[watch-my-terminal.git] / terminal.coffee
index 242d246..174c005 100644 (file)
@@ -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}"