summaryrefslogtreecommitdiff
path: root/xmake/modules/private/utils/progress.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-05-31 21:43:47 +0800
committerruki <[email protected]>2020-05-31 21:43:47 +0800
commit41bd7287e986fcf881c8d20494058c576bbcf252 (patch)
tree49d6b3d7082d87d37ff656ace7a0cd710245fda6 /xmake/modules/private/utils/progress.lua
parent3c1d11faa2ca0c6e6eb1664ee938d5c49867b02d (diff)
add tty and replace clearline
Diffstat (limited to 'xmake/modules/private/utils/progress.lua')
-rw-r--r--xmake/modules/private/utils/progress.lua3
1 files changed, 2 insertions, 1 deletions
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