fix(bonfire): keep a blank line printed during a live view (IN-11, quick-261028-rqd)
This commit is contained in:
@@ -539,8 +539,15 @@ func printAbove(owner *console, s string) bool {
|
||||
return false
|
||||
default:
|
||||
}
|
||||
block := strings.TrimSuffix(s, "\n")
|
||||
if block == "" && s != "" {
|
||||
// A blank line (Println()): bubbletea v2.1.0's insertAbove
|
||||
// returns early for an empty string, which would drop it, so
|
||||
// send a single space, which prints as a blank line.
|
||||
block = " "
|
||||
}
|
||||
// One message for the whole block, sent while holding liveMu: blocks
|
||||
// from different goroutines keep the order of their calls.
|
||||
v.prog.Send(printLine(strings.TrimSuffix(s, "\n")))
|
||||
v.prog.Send(printLine(block))
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user