Tabs behaving sensibly in expect.
authorTim Vaughan <tgvaughan@gmail.com>
Tue, 5 Jul 2016 20:35:13 +0000 (22:35 +0200)
committerTim Vaughan <tgvaughan@gmail.com>
Tue, 5 Jul 2016 20:35:13 +0000 (22:35 +0200)
src/forth.jl

index 609897a..dd808bb 100644 (file)
@@ -648,8 +648,13 @@ function getLineFromSTDIN()
 
         elseif key == '\b'
             if !isempty(line)
+                if line[length(line)] == '\t'
+                    print(string("\r\033[K",line[1:length(line)-1]))
+                else
+                    print("\b\033[K")
+                end
+
                 line = line[1:length(line)-1]
-                print("\b \b")
             end
 
         elseif key == '\e'