summaryrefslogtreecommitdiff
path: root/js/lex.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lex.js')
-rw-r--r--js/lex.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/js/lex.js b/js/lex.js
index 2dc1dd5..8c3b0f1 100644
--- a/js/lex.js
+++ b/js/lex.js
@@ -57,6 +57,11 @@ Lex.prototype.clone = function (lex){
this.opacity = lex.opacity
this.build()
}
+Lex.prototype.copy = function () {
+ var lex = new Lex (0,0)
+ lex.clone(this)
+ return lex
+}
Lex.prototype.erase = function (){
this.fg = colors.white
this.bg = colors.black
@@ -71,7 +76,10 @@ Lex.prototype.fill = function(fg, bg){
this.build()
}
Lex.prototype.eq = function(lex){
- return lex && this.fg == lex.fg && this.bg == lex.fg && this.char == lex.char
+ return lex && this.fg == lex.fg && this.bg == lex.bg && this.char == lex.char
+}
+Lex.prototype.ne = function(lex){
+ return ! this.eq(lex)
}
Lex.prototype.clear = function(){
this.bg = 1