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:
0f402aa
)
fix backspace (it wraps and doesn't clear)
author
Jason Woofenden
<jason@jasonwoof.com>
Thu, 31 Jan 2013 04:38:06 +0000
(23:38 -0500)
committer
Jason Woofenden
<jason@jasonwoof.com>
Thu, 31 Jan 2013 04:38:06 +0000
(23:38 -0500)
terminal.coffee
patch
|
blob
|
history
diff --git
a/terminal.coffee
b/terminal.coffee
index
751a53a
..
37d3971
100644
(file)
--- a/
terminal.coffee
+++ b/
terminal.coffee
@@
-83,10
+83,12
@@
class Terminal
when '\x0d' # cr
@x = 0
when '\x08' # backspace
when '\x0d' # cr
@x = 0
when '\x08' # backspace
- if @x > 0
+ if @x is 0
+ @x = @width - 1
+ if @y > 0
+ @y -= 1
+ else
@x -= 1
@x -= 1
- @text[@y][@x] = ' '
- # should this set the attribute too?
when '\x0a', '\x0b' # lf, vertical tab (same thing)
@wrap_to_next_line()
else
when '\x0a', '\x0b' # lf, vertical tab (same thing)
@wrap_to_next_line()
else