From 41bd7287e986fcf881c8d20494058c576bbcf252 Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 31 May 2020 21:43:47 +0800 Subject: add tty and replace clearline --- xmake/modules/private/utils/progress.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xmake/modules/private/utils/progress.lua') diff --git a/xmake/modules/private/utils/progress.lua b/xmake/modules/private/utils/progress.lua index 96678eee3..4ee0f40e8 100644 --- a/xmake/modules/private/utils/progress.lua +++ b/xmake/modules/private/utils/progress.lua @@ -22,6 +22,7 @@ import("core.base.option") import("core.base.object") import("core.base.colors") +import("core.base.tty") import("core.theme.theme") -- make back characters @@ -109,7 +110,7 @@ function show(progress, format, ...) if is_scroll then cprint(progress_prefix .. format, progress, ...) else - utils.clearline() + tty.erase_line_to_start().cr() local msg = vformat(progress_prefix .. format, progress, ...) local msg_plain = colors.translate(msg, {plain = true}) local maxwidth = os.getwinsize().width -- cgit v1.3.1