summaryrefslogtreecommitdiff
path: root/vendor/github.com/vbauerster/mpb/v7/cwriter
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-08-27 09:10:27 -0400
committerGitHub <noreply@github.com>2021-08-27 09:10:27 -0400
commit69cdf5d8035672e8bc7141cac0207e4b0f0e80cd (patch)
treebd2f9184eb3f7ca4aa7d3323b6fec350aae56209 /vendor/github.com/vbauerster/mpb/v7/cwriter
parent6f61ef87afe6695ca6cbd6e3b818ef619b6d54da (diff)
parentf5ce02b227f43feb7a02b09890facf198448621e (diff)
downloadpodman-69cdf5d8035672e8bc7141cac0207e4b0f0e80cd.tar.gz
podman-69cdf5d8035672e8bc7141cac0207e4b0f0e80cd.tar.bz2
podman-69cdf5d8035672e8bc7141cac0207e4b0f0e80cd.zip
Merge pull request #11330 from containers/dependabot/go_modules/github.com/containers/image/v5-5.16.0
Bump github.com/containers/image/v5 from 5.15.2 to 5.16.0
Diffstat (limited to 'vendor/github.com/vbauerster/mpb/v7/cwriter')
-rw-r--r--vendor/github.com/vbauerster/mpb/v7/cwriter/writer.go10
-rw-r--r--vendor/github.com/vbauerster/mpb/v7/cwriter/writer_windows.go4
2 files changed, 7 insertions, 7 deletions
diff --git a/vendor/github.com/vbauerster/mpb/v7/cwriter/writer.go b/vendor/github.com/vbauerster/mpb/v7/cwriter/writer.go
index 1ade54761..925c8b1dc 100644
--- a/vendor/github.com/vbauerster/mpb/v7/cwriter/writer.go
+++ b/vendor/github.com/vbauerster/mpb/v7/cwriter/writer.go
@@ -22,7 +22,7 @@ const (
type Writer struct {
out io.Writer
buf bytes.Buffer
- lineCount int
+ lines int
fd int
isTerminal bool
}
@@ -38,15 +38,15 @@ func New(out io.Writer) *Writer {
}
// Flush flushes the underlying buffer.
-func (w *Writer) Flush(lineCount int) (err error) {
+func (w *Writer) Flush(lines int) (err error) {
// some terminals interpret 'cursor up 0' as 'cursor up 1'
- if w.lineCount > 0 {
+ if w.lines > 0 {
err = w.clearLines()
if err != nil {
return
}
}
- w.lineCount = lineCount
+ w.lines = lines
_, err = w.buf.WriteTo(w.out)
return
}
@@ -78,7 +78,7 @@ func (w *Writer) GetWidth() (int, error) {
func (w *Writer) ansiCuuAndEd() (err error) {
buf := make([]byte, 8)
- buf = strconv.AppendInt(buf[:copy(buf, escOpen)], int64(w.lineCount), 10)
+ buf = strconv.AppendInt(buf[:copy(buf, escOpen)], int64(w.lines), 10)
_, err = w.out.Write(append(buf, cuuAndEd...))
return
}
diff --git a/vendor/github.com/vbauerster/mpb/v7/cwriter/writer_windows.go b/vendor/github.com/vbauerster/mpb/v7/cwriter/writer_windows.go
index 1a69c81ac..8f99dbe32 100644
--- a/vendor/github.com/vbauerster/mpb/v7/cwriter/writer_windows.go
+++ b/vendor/github.com/vbauerster/mpb/v7/cwriter/writer_windows.go
@@ -26,7 +26,7 @@ func (w *Writer) clearLines() error {
return err
}
- info.CursorPosition.Y -= int16(w.lineCount)
+ info.CursorPosition.Y -= int16(w.lines)
if info.CursorPosition.Y < 0 {
info.CursorPosition.Y = 0
}
@@ -40,7 +40,7 @@ func (w *Writer) clearLines() error {
X: info.Window.Left,
Y: info.CursorPosition.Y,
}
- count := uint32(info.Size.X) * uint32(w.lineCount)
+ count := uint32(info.Size.X) * uint32(w.lines)
_, _, _ = procFillConsoleOutputCharacter.Call(
uintptr(w.fd),
uintptr(' '),