mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-02 02:59:09 -07:00
Make golint happy
This commit is contained in:
4
key.go
4
key.go
@@ -187,7 +187,7 @@ const (
|
|||||||
KeyPgDown
|
KeyPgDown
|
||||||
)
|
)
|
||||||
|
|
||||||
// Mapping for control keys to friendly consts
|
// Mapping for control keys to friendly consts:
|
||||||
var keyNames = map[int]string{
|
var keyNames = map[int]string{
|
||||||
keyNUL: "ctrl+@", // also ctrl+`
|
keyNUL: "ctrl+@", // also ctrl+`
|
||||||
keySOH: "ctrl+a",
|
keySOH: "ctrl+a",
|
||||||
@@ -272,7 +272,7 @@ var hexes = map[string]Key{
|
|||||||
}
|
}
|
||||||
|
|
||||||
// readInput reads keypress and mouse input from a TTY and returns a message
|
// readInput reads keypress and mouse input from a TTY and returns a message
|
||||||
// containing information about the key or mouse event accordingly
|
// containing information about the key or mouse event accordingly.
|
||||||
func readInput(r io.Reader) (Msg, error) {
|
func readInput(r io.Reader) (Msg, error) {
|
||||||
var buf [256]byte
|
var buf [256]byte
|
||||||
|
|
||||||
|
|||||||
@@ -116,7 +116,6 @@ func (r *renderer) flush() {
|
|||||||
// Clear any lines we painted in the last render.
|
// Clear any lines we painted in the last render.
|
||||||
if r.linesRendered > 0 {
|
if r.linesRendered > 0 {
|
||||||
for i := r.linesRendered - 1; i > 0; i-- {
|
for i := r.linesRendered - 1; i > 0; i-- {
|
||||||
|
|
||||||
// Check if we should skip rendering for this line. Clearing the
|
// Check if we should skip rendering for this line. Clearing the
|
||||||
// line before painting is part of the standard rendering routine.
|
// line before painting is part of the standard rendering routine.
|
||||||
if _, exists := r.ignoreLines[i]; !exists {
|
if _, exists := r.ignoreLines[i]; !exists {
|
||||||
@@ -211,7 +210,6 @@ func (r *renderer) setIgnoredLines(from int, to int) {
|
|||||||
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())
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// clearIgnoredLines returns control of any ignored lines to the standard
|
// clearIgnoredLines returns control of any ignored lines to the standard
|
||||||
|
|||||||
Reference in New Issue
Block a user