Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
watch-my-terminal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix ESC[0m, implement italic, render invisible
[watch-my-terminal.git]
/
terminal.coffee
diff --git
a/terminal.coffee
b/terminal.coffee
index
0ba72f4
..
d6838da
100644
(file)
--- a/
terminal.coffee
+++ b/
terminal.coffee
@@
-228,12
+228,13
@@
class Terminal
switch arg
# remove all style/color
when '0'
switch arg
# remove all style/color
when '0'
- @a = 0
+ @a = 0x07
# style attributes
when '1' # bold
@set_attribute_bits 0x010000, 0x010000
# style attributes
when '1' # bold
@set_attribute_bits 0x010000, 0x010000
- # FIXME add '3' for italic ('23' to turn it off)
+ when '3' # italic (rare)
+ @set_attribute_bits 0x200000, 0x200000
when '4' # underline
@set_attribute_bits 0x020000, 0x020000
when '5' # blink
when '4' # underline
@set_attribute_bits 0x020000, 0x020000
when '5' # blink
@@
-244,10
+245,12
@@
class Terminal
@set_attribute_bits 0x100000, 0x100000
# disable style attributes
@set_attribute_bits 0x100000, 0x100000
# disable style attributes
- when '22' # not bold... according to a page
+ when '21' # not bold (rare)
@set_attribute_bits 0x010000, 0
@set_attribute_bits 0x010000, 0
- when '21' # ... though this would make more sense for "not bold"
+ when '22' # not bold
@set_attribute_bits 0x010000, 0
@set_attribute_bits 0x010000, 0
+ when '23' # not italic (rare)
+ @set_attribute_bits 0x200000, 0
when '24' # not underline
@set_attribute_bits 0x020000, 0
when '25' # not blink
when '24' # not underline
@set_attribute_bits 0x020000, 0
when '25' # not blink