Skip to content

Commit 48cfdd0

Browse files
committed
Include patch from the following PR:
gosuri#33
1 parent 11a6ee7 commit 48cfdd0

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
module github.com/gosuri/uilive
1+
module github.com/atrbgithub/uilive
22

33
go 1.10

writer.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ func (w *Writer) Flush() error {
9090
lines++
9191
currentLine.Reset()
9292
} else {
93-
currentLine.Write([]byte{b})
94-
if overFlowHandled && currentLine.Len() > termWidth {
93+
if overFlowHandled && currentLine.Len() >= termWidth {
9594
lines++
9695
currentLine.Reset()
9796
}
97+
currentLine.Write([]byte{b})
9898
}
9999
}
100100
w.lineCount = lines
@@ -170,4 +170,4 @@ func (n *newline) Write(p []byte) (int, error) {
170170
n.writer.mtx.Lock()
171171
defer n.writer.mtx.Unlock()
172172
return n.writer.buf.Write(p)
173-
}
173+
}

0 commit comments

Comments
 (0)