mirror of
https://github.com/docker/compose.git
synced 2026-11-20 06:59:53 +00:00
fix(display): reset the screen after degraded out-of-operation lines
A plain line printed outside any operation lands below the tracked block, so the block is no longer directly above the cursor. Reset the screen so the next operation repaints a fresh block instead of moving the cursor over rows that shifted — the same reason unsuspend resets after buildkit output. Suggested-by: Guillaume Lours <705411+glours@users.noreply.github.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
1a3bb4f6f5
commit
68d9b510cc
1 changed files with 5 additions and 1 deletions
|
|
@ -191,8 +191,12 @@ func (w *termWriter) handle(e api.Resource) {
|
|||
w.tree.apply(e, w.now())
|
||||
|
||||
if w.operation == "" {
|
||||
// outside any operation: degrade to one plain line per event
|
||||
// outside any operation: degrade to one plain line per event. This
|
||||
// prints outside the tracked block, so the next repaint must not
|
||||
// assume the block is still directly above the cursor (same reason
|
||||
// unsuspend resets after buildkit output).
|
||||
_, _ = fmt.Fprintf(w.out, "%s %s %s\n", e.ID, eventColor(e.Status, SuccessColor)(e.Text), e.Details)
|
||||
w.scr.reset()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue