aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Hoelz <rob@hoelz.ro>2013-02-21 21:13:03 +0100
committerRob Hoelz <rob@hoelz.ro>2013-02-21 21:13:03 +0100
commit74da48b05dcfb3841bbf8c13e2f8cc51defd05b7 (patch)
tree4bc4fe14d6279d6e50b1b2780d59f679936df503
parent91cb6f46bffd8121dfb27038ad871122fc76df3b (diff)
downloadlua-term-74da48b05dcfb3841bbf8c13e2f8cc51defd05b7.tar.gz
lua-term-74da48b05dcfb3841bbf8c13e2f8cc51defd05b7.tar.bz2
lua-term-74da48b05dcfb3841bbf8c13e2f8cc51defd05b7.zip
Don't hide the metatable for colors
-rw-r--r--CHANGES1
-rw-r--r--term/colors.lua2
2 files changed, 1 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index 87e23ce..388c06e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3,6 +3,7 @@
3 - Add clear functions. 3 - Add clear functions.
4 - Deprecate term.isatty. Use luaposix instead. 4 - Deprecate term.isatty. Use luaposix instead.
5 - Add colors.default as a synonym for colors.reset. 5 - Add colors.default as a synonym for colors.reset.
6 - The metatable for colors is no longer hidden.
6 7
70.01 2012-06-25 23:30:00 80.01 2012-06-25 23:30:00
8 - Initial release. Includes colors and isatty. 9 - Initial release. Includes colors and isatty.
diff --git a/term/colors.lua b/term/colors.lua
index 63d752b..76f8b2e 100644
--- a/term/colors.lua
+++ b/term/colors.lua
@@ -39,8 +39,6 @@ function colormt:__call(s)
39 return self .. s .. colors.reset 39 return self .. s .. colors.reset
40end 40end
41 41
42colormt.__metatable = {}
43
44local function makecolor(value) 42local function makecolor(value)
45 return setmetatable({ value = schar(27) .. '[' .. tostring(value) .. 'm' }, colormt) 43 return setmetatable({ value = schar(27) .. '[' .. tostring(value) .. 'm' }, colormt)
46end 44end