diff options
| author | ruki <[email protected]> | 2025-10-29 23:59:49 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-10-29 23:59:49 +0800 |
| commit | 291738879dc7a14540121a7f595124b683d2f8b5 (patch) | |
| tree | ba38b148a98b1054b685096d4526d80a672f405d /xmake/modules/utils/progress.lua | |
| parent | d6255d98b9a09366d238e8579b18be9add773222 (diff) | |
improve show_output
Diffstat (limited to 'xmake/modules/utils/progress.lua')
| -rw-r--r-- | xmake/modules/utils/progress.lua | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/xmake/modules/utils/progress.lua b/xmake/modules/utils/progress.lua index ca6a9ec01..ed2a911c1 100644 --- a/xmake/modules/utils/progress.lua +++ b/xmake/modules/utils/progress.lua @@ -222,12 +222,12 @@ function _show_progress_with_multirow_refresh(progress, format, ...) end if is_finished then - _g.showing_without_scroll = false + _g.is_refreshing = false _g.progress_lineinfos = nil _g.linecount = 0 tty.cursor_show() else - _g.showing_without_scroll = true + _g.is_refreshing = true _g.linecount = linecount end io.flush() @@ -241,9 +241,9 @@ function _show_progress_with_singlerow_refresh(progress, format, ...) cprintf(progress_prefix .. format, progress, ...) if is_finished then print("") - _g.showing_without_scroll = false + _g.is_refreshing = false else - _g.showing_without_scroll = true + _g.is_refreshing = true end io.flush() end @@ -268,9 +268,11 @@ 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("") + if not _g.is_refreshing then + return end + + print("") cprint(format, ...) end |
