- # clear (some or all of) current line
- csi_K: (direction) ->
- switch @fix_esc_arg direction, '0'
- when '0' # erase to right
- for i in [@x...@width]
- @text[@y][i] = ' '
- @attributes[@y][i] = @a
- when '1' # erase to left
- for i in [0...@x]
- @text[@y][i] = ' '
- @attributes[@y][i] = @a
- when '0' # erase whole line
- for i in [0...@width]
- @text[@y][i] = ' '
- @attributes[@y][i] = @a
-