+ # csi_@: rxvt does nothing I can detect
+
+ # move cursor up
+ csi_A: (lines) ->
+ lines = parseInt @fix_esc_arg lines, '1'
+ @y -= lines
+ if @y < 0
+ @y = 0
+
+ # move cursor down
+ csi_B: (lines) ->
+ lines = parseInt @fix_esc_arg lines, '1'
+ @y += lines
+ if @y >= @height
+ @y = @height - 1
+
+ # move cursor right
+ csi_C: (cols) ->
+ cols = parseInt @fix_esc_arg cols, '1'
+ @x += cols
+ if @x >= @width
+ @x = @width - 1
+
+ # move cursor left
+ csi_D: (cols) ->
+ cols = parseInt @fix_esc_arg cols, '1'
+ @x -= cols
+ if @x < 0
+ @x = 0
+