forked from Mirrors/bubbletea
Explicitly ignore io.Writer return values in renderer
This commit is contained in:
parent
fb48e03639
commit
591fcabdd4
1
mouse.go
1
mouse.go
|
@ -2,6 +2,7 @@ package tea
|
||||||
|
|
||||||
import "errors"
|
import "errors"
|
||||||
|
|
||||||
|
// MouseMsg contains information about a mouse event.
|
||||||
type MouseMsg MouseEvent
|
type MouseMsg MouseEvent
|
||||||
|
|
||||||
// MouseEvent represents a mouse event, which could be a click, a scroll wheel
|
// MouseEvent represents a mouse event, which could be a click, a scroll wheel
|
||||||
|
|
|
@ -208,7 +208,7 @@ func (r *renderer) setIgnoredLines(from int, to int) {
|
||||||
cursorUp(out)
|
cursorUp(out)
|
||||||
}
|
}
|
||||||
moveCursor(out, r.linesRendered, 0) // put cursor back
|
moveCursor(out, r.linesRendered, 0) // put cursor back
|
||||||
r.out.Write(out.Bytes())
|
_, _ = r.out.Write(out.Bytes())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ func (r *renderer) insertTop(lines []string, topBoundary, bottomBoundary int) {
|
||||||
// Move cursor back to where the main rendering routine expects it to be
|
// Move cursor back to where the main rendering routine expects it to be
|
||||||
moveCursor(b, r.linesRendered, 0)
|
moveCursor(b, r.linesRendered, 0)
|
||||||
|
|
||||||
r.out.Write(b.Bytes())
|
_, _ = r.out.Write(b.Bytes())
|
||||||
}
|
}
|
||||||
|
|
||||||
// insertBottom effectively scrolls down. It inserts lines at the bottom of
|
// insertBottom effectively scrolls down. It inserts lines at the bottom of
|
||||||
|
@ -278,7 +278,7 @@ func (r *renderer) insertBottom(lines []string, topBoundary, bottomBoundary int)
|
||||||
// Move cursor back to where the main rendering routine expects it to be
|
// Move cursor back to where the main rendering routine expects it to be
|
||||||
moveCursor(b, r.linesRendered, 0)
|
moveCursor(b, r.linesRendered, 0)
|
||||||
|
|
||||||
r.out.Write(b.Bytes())
|
_, _ = r.out.Write(b.Bytes())
|
||||||
}
|
}
|
||||||
|
|
||||||
// handleMessages handles internal messages for the renderer.
|
// handleMessages handles internal messages for the renderer.
|
||||||
|
|
Loading…
Reference in New Issue