JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
fix a comment
[watch-my-terminal.git] / terminal.coffee
index 242d246..3f81daa 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}"
@@ -479,7 +479,7 @@ class Terminal
                else
                        @csi_L '1'
 
-       # str is the whole escape sequence (minus the esc[ prefix)
+       # str is the whole escape sequence (minus the esc character)
        update_sequence: (str) ->
                if str[0] is '['
                        prefix = 'csi_'