From: Tim Vaughan Date: Tue, 5 Jul 2016 20:35:13 +0000 (+0200) Subject: Tabs behaving sensibly in expect. X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=forth.jl.git;a=commitdiff_plain;h=c564df1ac9c430207bb7f64b8f39f61bdf97e099 Tabs behaving sensibly in expect. --- diff --git a/src/forth.jl b/src/forth.jl index 609897a..dd808bb 100644 --- a/src/forth.jl +++ b/src/forth.jl @@ -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'