Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
watch-my-terminal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f98881c
)
make csi_J(0/1) clear part of current line too
author
Jason Woofenden
<jason@jasonwoof.com>
Thu, 31 Jan 2013 04:28:26 +0000
(23:28 -0500)
committer
Jason Woofenden
<jason@jasonwoof.com>
Thu, 31 Jan 2013 04:28:26 +0000
(23:28 -0500)
terminal.coffee
patch
|
blob
|
history
diff --git
a/terminal.coffee
b/terminal.coffee
index
3c8c9a9
..
751a53a
100644
(file)
--- a/
terminal.coffee
+++ b/
terminal.coffee
@@
-132,15
+132,21
@@
class Terminal
@x = column
@y = row
@x = column
@y = row
- # clear lines (implemented inclusive of the current line)
+ # clear to screen edge(es)
csi_J: (direction) ->
switch @fix_esc_arg direction, '0'
when '0' # erase down
csi_J: (direction) ->
switch @fix_esc_arg direction, '0'
when '0' # erase down
+ # rest of current line
+ @csi_K direction
+ # rest of lines
for row in [@y...@height]
for i in [0...@width]
@text[row][i] = ' '
@attributes[row][i] = @a
when '1' # erase up
for row in [@y...@height]
for i in [0...@width]
@text[row][i] = ' '
@attributes[row][i] = @a
when '1' # erase up
+ # beginning of current line
+ @csi_K direction
+ # all previous lines
for row in [0..@y]
for i in [0...@width]
@text[row][i] = ' '
for row in [0..@y]
for i in [0...@width]
@text[row][i] = ' '