Skip to content

Commit

Permalink
fix(repl): restore line clear before highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
giann committed Jan 28, 2025
1 parent 7b8bab3 commit 31f6102
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/repl.zig
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,10 @@ pub fn repl(allocator: std.mem.Allocator) !void {
);
// Go up one line, erase it
stdout.print(
"{s}",
if (builtin.os.tag == .windows)
"{s}"
else
"\x1b[1A\r\x1b[2K{s}",
.{
if (previous_input != null)
MULTILINE_PROMPT
Expand Down

0 comments on commit 31f6102

Please sign in to comment.