+ "csi_@": (chars) ->
+ chars = parseInt @fix_esc_arg chars, '1'
+ if chars < 1
+ return
+ if chars > @width - @x
+ chars = @width - @x
+ else
+ dest = @width - 1
+ if dest >= @width
+ dest = @width - 1
+ while dest - chars >= @x
+ @text[@y][dest] = @text[@y][dest - chars]
+ @attributes[@y][dest] = @attributes[@y][dest - chars]
+ dest -= 1
+ @csi_X chars # clear
+ csi_P: (chars) ->
+ chars = parseInt @fix_esc_arg chars, '1'
+ if chars < 1
+ return
+ if chars > @width - @x
+ chars = @width - @x
+ else
+ dest = @x
+ while dest < @width - chars
+ @text[@y][dest] = @text[@y][dest + chars]
+ @attributes[@y][dest] = @attributes[@y][dest + chars]
+ dest += 1
+ # clear the space moved out of
+ x = @width - chars
+ while x < @width
+ @text[@y][x] = ' '
+ @attributes[@y][x] = @a
+ x += 1