summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Hoelz <rob@hoelz.ro>2014-04-02 07:31:06 -0500
committerRob Hoelz <rob@hoelz.ro>2014-04-02 07:31:06 -0500
commitd1eef79264aa5b0aa1b56ff77d03ab4b8803e9c1 (patch)
tree230be4a36cdd9b4f44fdb916a5f222f7ccbdb174
parent2a984267c8abc1435901bf713037fd799a3bf726 (diff)
downloadlua-term-d1eef79264aa5b0aa1b56ff77d03ab4b8803e9c1.tar.gz
lua-term-d1eef79264aa5b0aa1b56ff77d03ab4b8803e9c1.tar.bz2
lua-term-d1eef79264aa5b0aa1b56ff77d03ab4b8803e9c1.zip
Provide jump as alternative to cursor.goto
For Lua 5.2
-rw-r--r--term/cursor.lua6
1 files changed, 5 insertions, 1 deletions
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 @@
20 20
21local term = require 'term.core' 21local term = require 'term.core'
22 22
23return { 23local cursor = {
24 ['goto'] = term.maketermfunc '%d;%dH', 24 ['goto'] = term.maketermfunc '%d;%dH',
25 goup = term.maketermfunc '%d;A', 25 goup = term.maketermfunc '%d;A',
26 godown = term.maketermfunc '%d;B', 26 godown = term.maketermfunc '%d;B',
@@ -29,3 +29,7 @@ return {
29 save = term.maketermfunc 's', 29 save = term.maketermfunc 's',
30 restore = term.maketermfunc 'u', 30 restore = term.maketermfunc 'u',
31} 31}
32
33cursor.jump = cursor['goto']
34
35return cursor