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
(parent:
639264f
)
when clearing, careful of cursor being after right-most column
author
Jason Woofenden
<jason@jasonwoof.com>
Thu, 31 Jan 2013 05:03:57 +0000
(
00:03
-0500)
committer
Jason Woofenden
<jason@jasonwoof.com>
Thu, 31 Jan 2013 05:03:57 +0000
(
00:03
-0500)
terminal.coffee
patch
|
blob
|
history
diff --git
a/terminal.coffee
b/terminal.coffee
index
19296bf
..
913d874
100644
(file)
--- a/
terminal.coffee
+++ b/
terminal.coffee
@@
-169,7
+169,12
@@
class Terminal
@text[@y][i] = ' '
@attributes[@y][i] = @a
when '1' # erase to left
- for i in [0..@x]
+ # @x can equal @width (after printing to right-most column)
+ if @x < @width
+ max = @x
+ else
+ max = @width - 1
+ for i in [0..max]
@text[@y][i] = ' '
@attributes[@y][i] = @a
when '2' # erase whole line