Merge pull request #669 from gsd-build/fix/662-task-count-display
fix: clamp task counter to prevent display overflow after loop recovery
This commit is contained in:
commit
26b4e483bd
1 changed files with 2 additions and 1 deletions
|
|
@ -340,7 +340,8 @@ export function updateProgressWidget(
|
|||
let meta = theme.fg("dim", `${done}/${total} slices`);
|
||||
|
||||
if (activeSliceTasks && activeSliceTasks.total > 0) {
|
||||
meta += theme.fg("dim", ` · task ${activeSliceTasks.done + 1}/${activeSliceTasks.total}`);
|
||||
const taskNum = Math.min(activeSliceTasks.done + 1, activeSliceTasks.total);
|
||||
meta += theme.fg("dim", ` · task ${taskNum}/${activeSliceTasks.total}`);
|
||||
}
|
||||
|
||||
lines.push(truncateToWidth(`${pad}${bar} ${meta}`, width));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue