summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2008-10-03 10:50:19 -0700
committerPixel <pixel@nobis-crew.org>2008-10-03 10:50:19 -0700
commit314b7e319c1392841b07a0800ed76c48d36c74db (patch)
tree5b22addd849e1f5b58bb9b8bfc9a4b64a7a04af0
parent20c55fdf87d8887c4922aa8915449715b98d37e3 (diff)
Adding the dtable function.
-rw-r--r--lib/supportlib.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/supportlib.lua b/lib/supportlib.lua
index a8e2f93..7c7905c 100644
--- a/lib/supportlib.lua
+++ b/lib/supportlib.lua
@@ -209,3 +209,19 @@ end
function trim(str)
return ltrim(rtrim(str))
end
+
+
+--
+-- Displays a table on screen.
+--
+
+function dtable(x, y)
+ local b = Buffer()
+ if y then
+ dumpvars(b, x, y)
+ else
+ dumpvars(b, x)
+ end
+ display(b)
+ b:close()
+end