diff options
| author | ruki <[email protected]> | 2025-10-29 23:58:15 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-10-29 23:58:15 +0800 |
| commit | d6255d98b9a09366d238e8579b18be9add773222 (patch) | |
| tree | af66755d792b12c4525812f88f12eca54392a804 /xmake/modules/utils/progress.lua | |
| parent | a2974bf870a7ef03a5cf7c5154d65bc5a38b18fa (diff) | |
add progress.show_output
Diffstat (limited to 'xmake/modules/utils/progress.lua')
| -rw-r--r-- | xmake/modules/utils/progress.lua | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/xmake/modules/utils/progress.lua b/xmake/modules/utils/progress.lua index fadc443e1..ca6a9ec01 100644 --- a/xmake/modules/utils/progress.lua +++ b/xmake/modules/utils/progress.lua @@ -248,11 +248,6 @@ function _show_progress_with_singlerow_refresh(progress, format, ...) io.flush() end --- showing progress line without scroll? -function showing_without_scroll() - return _g.showing_without_scroll -end - -- show the message with progress function show(progress, format, ...) progress = type(progress) == "table" and progress:percent() or math.floor(progress) @@ -270,6 +265,15 @@ function show(progress, format, ...) end end +-- print additional output logs with colors outside the progress log area, such as warning logs. +-- it's used when the progress style is multirow/singlerow refresh. +function show_output(format, ...) + if _g.showing_without_scroll then + print("") + end + cprint(format, ...) +end + -- get the message text with progress function text(progress, format, ...) progress = type(progress) == "table" and progress:percent() or math.floor(progress) |
