diff options
| author | ruki <[email protected]> | 2020-05-31 20:16:16 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-05-31 20:16:16 +0800 |
| commit | f4722dfda56d29542de5b4fdf06e969473f120bf (patch) | |
| tree | 515d3269c7f868a3475d6573a3989fc767a3a267 /xmake/core/sandbox/modules/utils.lua | |
| parent | be4e9c0603d410b6cb7706645f555b49d66b9096 (diff) | |
improve for msys
Diffstat (limited to 'xmake/core/sandbox/modules/utils.lua')
| -rw-r--r-- | xmake/core/sandbox/modules/utils.lua | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/xmake/core/sandbox/modules/utils.lua b/xmake/core/sandbox/modules/utils.lua index ff84a01ce..8b7ca4c5f 100644 --- a/xmake/core/sandbox/modules/utils.lua +++ b/xmake/core/sandbox/modules/utils.lua @@ -179,27 +179,7 @@ function sandbox_utils.clearline() if not io.isatty() then return end - - -- get empty line chars - local emptychars = sandbox_utils._EMPTYCHARS - if not emptychars then - - -- get left width - local width = os.getwinsize()["width"] - if not width or width <= 0 then - width = 64 - end - - -- make empty chars - emptychars = "" - for i = 1, width do - emptychars = emptychars .. " " - end - sandbox_utils._EMPTYCHARS = emptychars - end - - -- clear line - sandbox_utils.printf("\r" .. emptychars .. "\r") + sandbox_utils.printf("\x1b[2K\r") end -- assert |
