Replace screen-clear implementation
John Smith

John Smith commited on 2022-108 22:49:08
Showing 1 changed files, with 2 additions and 2 deletions.


Replacing the `^[c` clear string with `^[[H^[[J`
preserves screen-clearing functionality
whilst removing the superfluous bell effect given by XTerm.
... ...
@@ -34,8 +34,8 @@ end
34 34
     implementation may be platform-specific
35 35
 ]]
36 36
 local function clear()
37
-    -- XTerm
38
-    io.write("\x1bc")
37
+    -- ANSI
38
+    io.write("\x1b[H\x1b[J")
39 39
 end
40 40
 
41 41
 --[[
42 42