mirror of https://github.com/docker/compose.git
Skip child events when printer events > terminal height
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
This commit is contained in:
parent
4ad87463c5
commit
69a09624c9
|
@ -157,6 +157,10 @@ func (w *ttyWriter) print() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
skipChildEvents := false
|
||||||
|
if len(w.eventIDs) > goterm.Height()-1 {
|
||||||
|
skipChildEvents = true
|
||||||
|
}
|
||||||
numLines := 0
|
numLines := 0
|
||||||
for _, v := range w.eventIDs {
|
for _, v := range w.eventIDs {
|
||||||
event := w.events[v]
|
event := w.events[v]
|
||||||
|
@ -169,6 +173,9 @@ func (w *ttyWriter) print() {
|
||||||
for _, v := range w.eventIDs {
|
for _, v := range w.eventIDs {
|
||||||
ev := w.events[v]
|
ev := w.events[v]
|
||||||
if ev.ParentID == event.ID {
|
if ev.ParentID == event.ID {
|
||||||
|
if skipChildEvents {
|
||||||
|
continue
|
||||||
|
}
|
||||||
line := lineText(ev, " ", terminalWidth, statusPadding, runtime.GOOS != "windows")
|
line := lineText(ev, " ", terminalWidth, statusPadding, runtime.GOOS != "windows")
|
||||||
fmt.Fprint(w.out, line)
|
fmt.Fprint(w.out, line)
|
||||||
numLines++
|
numLines++
|
||||||
|
|
Loading…
Reference in New Issue