about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-02-09 17:58:35 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-02-09 17:58:35 -0800
commitba9132e6fd956362f9c20817d6ebffa7f2c4422c (patch)
treeb80d4748cc6e40236bdbc82edcefe536042145ba
parentb473d6cbd57fcf86730606bac2f9ea913762cec9 (diff)
downloadmu-ba9132e6fd956362f9c20817d6ebffa7f2c4422c.tar.gz
725 - now support cursor movement
This had been on hold for some time; dependencies are crutches.
-rw-r--r--mu.arc8
1 files changed, 8 insertions, 0 deletions
diff --git a/mu.arc b/mu.arc
index 08fe7cc6..771cb57f 100644
--- a/mu.arc
+++ b/mu.arc
@@ -694,6 +694,14 @@
                   (do1 nil (pr (+ "\e[" (m arg.0) ";" (m arg.1) "H")))
                 cursor-on-host-to-next-line
                   (do1 nil (pr "\r\n"))
+                cursor-up-on-host
+                  (do1 nil (pr (+ "\e[" (aif (len> arg 0) (or m arg.0) 1) "A")))
+                cursor-down-on-host
+                  (do1 nil (pr (+ "\e[" (aif (len> arg 0) (or m arg.0) 1) "B")))
+                cursor-right-on-host
+                  (do1 nil (pr (+ "\e[" (aif (len> arg 0) (or m arg.0) 1) "C")))
+                cursor-left-on-host
+                  (do1 nil (pr (+ "\e[" (aif (len> arg 0) (or m arg.0) 1) "D")))
                 print-character-to-host
                   (do1 nil
                        (assert (in (type:m arg.0) 'char 'sym) (rep (m arg.0)))