about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-01-24 23:18:02 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-01-24 23:18:02 -0800
commitc1e6a522bdd7e8c9368cf506b1021a38873d30f2 (patch)
treedddc2be59b5009984d46471124296683737be49f
parent845a989f585ab2d06b31094c488cf50b08f75d25 (diff)
downloadmu-c1e6a522bdd7e8c9368cf506b1021a38873d30f2.tar.gz
612 - support for the backspace key
-rw-r--r--mu.arc7
1 files changed, 7 insertions, 0 deletions
diff --git a/mu.arc b/mu.arc
index bd998aa2..1a7c7cc7 100644
--- a/mu.arc
+++ b/mu.arc
@@ -673,6 +673,11 @@
                          (caselet x (m arg.0)
                            #\newline
                              ($.charterm-newline)
+                           #\backspace
+                             ; backspace doesn't clear after moving the cursor
+                             (do ($.charterm-display #\backspace)
+                                 ($.charterm-display #\space)
+                                 ($.charterm-display #\backspace))
                            ;else
                              ($.charterm-display x)))
                        )
@@ -684,6 +689,8 @@
                                  ; charterm exceptions
                                  return
                                    (= result #\newline)
+                                 backspace
+                                   (= result #\backspace)
                                  )))
                       ($.graphics-open?)
                         ($.ready-key-press Viewport))