summaryrefslogtreecommitdiff
path: root/xmake/modules/utils/progress.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2025-11-20 22:22:58 +0800
committerruki <[email protected]>2025-11-20 22:22:58 +0800
commite23894bf0cd55d0f8b1bd6c9e507c60aa6182507 (patch)
tree2aefb55ee814081cc359dcaa6880891f818113f9 /xmake/modules/utils/progress.lua
parent95cb9ca1d4bcf164b3d85e25c64a33ba3a74be7e (diff)
fix refresh progress
Diffstat (limited to 'xmake/modules/utils/progress.lua')
-rw-r--r--xmake/modules/utils/progress.lua14
1 files changed, 8 insertions, 6 deletions
diff --git a/xmake/modules/utils/progress.lua b/xmake/modules/utils/progress.lua
index d531bee90..39b49841c 100644
--- a/xmake/modules/utils/progress.lua
+++ b/xmake/modules/utils/progress.lua
@@ -221,12 +221,6 @@ function _redraw_multirow_progress(maxwidth)
return
end
- -- move cursor back to the top of progress area to avoid scrolling
- local linecount = _g.linecount or 0
- if linecount > 0 then
- tty.cursor_move_up(linecount + 1)
- end
-
-- redraw the total progress line
tty.erase_line().cr()
cprint(last_total_progress)
@@ -407,6 +401,14 @@ end
function refresh()
local refresh_mode = _g.refresh_mode
if refresh_mode == "multirow" then
+
+ -- move cursor back to the top of progress area to avoid scrolling
+ local linecount = _g.linecount or 0
+ if linecount > 0 and not ss then
+ tty.cursor_move_up(linecount + 1)
+ end
+
+ -- redraw the progress area immediately
local maxwidth = os.getwinsize().width
_redraw_multirow_progress(maxwidth)
end