Skip to content

Commit

Permalink
Include patch from the following PR:
Browse files Browse the repository at this point in the history
  • Loading branch information
atrbgithub committed Dec 6, 2022
1 parent 11a6ee7 commit 48cfdd0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/gosuri/uilive
module github.com/atrbgithub/uilive

go 1.10
6 changes: 3 additions & 3 deletions writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ func (w *Writer) Flush() error {
lines++
currentLine.Reset()
} else {
currentLine.Write([]byte{b})
if overFlowHandled && currentLine.Len() > termWidth {
if overFlowHandled && currentLine.Len() >= termWidth {
lines++
currentLine.Reset()
}
currentLine.Write([]byte{b})
}
}
w.lineCount = lines
Expand Down Expand Up @@ -170,4 +170,4 @@ func (n *newline) Write(p []byte) (int, error) {
n.writer.mtx.Lock()
defer n.writer.mtx.Unlock()
return n.writer.buf.Write(p)
}
}

0 comments on commit 48cfdd0

Please sign in to comment.