From d1eef79264aa5b0aa1b56ff77d03ab4b8803e9c1 Mon Sep 17 00:00:00 2001 From: Rob Hoelz Date: Wed, 2 Apr 2014 07:31:06 -0500 Subject: Provide jump as alternative to cursor.goto For Lua 5.2 --- term/cursor.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'term') diff --git a/term/cursor.lua b/term/cursor.lua index b7d09cd..e8480a9 100644 --- a/term/cursor.lua +++ b/term/cursor.lua @@ -20,7 +20,7 @@ local term = require 'term.core' -return { +local cursor = { ['goto'] = term.maketermfunc '%d;%dH', goup = term.maketermfunc '%d;A', godown = term.maketermfunc '%d;B', @@ -29,3 +29,7 @@ return { save = term.maketermfunc 's', restore = term.maketermfunc 'u', } + +cursor.jump = cursor['goto'] + +return cursor -- cgit v1.2.3-55-g6feb