Skip to content

Commit e659b46

Browse files
phanenjunegunn
andauthored
feat: append spinner in the end when --info=inline (#4567)
Test: go run main.go --query "$(seq 100)" --info inline --border < <(sleep 60) go run main.go --query "$(seq 100)" --info inline --info-command 'echo hello' --border < <(sleep 60) Close #4344 Close #619 Co-authored-by: Junegunn Choi <[email protected]>
1 parent 991c364 commit e659b46

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/terminal.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2981,6 +2981,11 @@ func (t *Terminal) printInfoImpl() {
29812981
} else {
29822982
outputPrinter(t.window, maxWidth)
29832983
}
2984+
if t.infoStyle == infoInline && outputLen < maxWidth-1 && t.reading {
2985+
t.window.Print(" ")
2986+
printSpinner()
2987+
outputLen += 2
2988+
}
29842989

29852990
if t.infoStyle == infoInlineRight {
29862991
if t.separatorLen > 0 {

0 commit comments

Comments
 (0)