# set cursor position (one based)
csi_H: (row, column) ->
- row = 0 + @fix_esc_arg row, 1
- column = 0 + @fix_esc_arg column, 1
-
- # convert to 0 base
- column -= 1
+ # handle blank/missing args and convert to 0 base
+ row = @fix_esc_arg(row, 1) - 1
+ column = @fix_esc_arg(column, 1) - 1
#clamp values
if column < 0
@attributes[row][i] = @a
else
console.log "confusing arg for csi_J: #{direction}"
+ return
# clear (some or all of) current line
csi_K: (direction) ->
@attributes[@y][i] = @a
else
console.log "confusing arg for csi_K: #{direction}"
+ return
# misc
csiq_h: ->