diff options
author | Rob Hoelz <rob@hoelz.ro> | 2014-04-02 07:31:06 -0500 |
---|---|---|
committer | Rob Hoelz <rob@hoelz.ro> | 2014-04-02 07:31:06 -0500 |
commit | d1eef79264aa5b0aa1b56ff77d03ab4b8803e9c1 (patch) | |
tree | 230be4a36cdd9b4f44fdb916a5f222f7ccbdb174 | |
parent | 2a984267c8abc1435901bf713037fd799a3bf726 (diff) | |
download | lua-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.lua | 6 |
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 | ||
21 | local term = require 'term.core' | 21 | local term = require 'term.core' |
22 | 22 | ||
23 | return { | 23 | local 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 | |||
33 | cursor.jump = cursor['goto'] | ||
34 | |||
35 | return cursor | ||