all: apply suggestions from staticcheck.io

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2022-06-03 12:22:52 +02:00
committed by Elias Naur
parent 11192a5142
commit 916efb4612
13 changed files with 7 additions and 219 deletions
-18
View File
@@ -126,8 +126,6 @@ type maskReader struct {
maskBuf [utf8.UTFMax]byte
// mask is the utf-8 encoded mask rune.
mask []byte
// overflow contains excess mask bytes left over after the last Read call.
overflow []byte
}
// combinedPos is a point in the editor.
@@ -198,14 +196,6 @@ type SubmitEvent struct {
// Editor.SelectedText() (which can be empty).
type SelectEvent struct{}
type line struct {
offset image.Point
clip clip.Op
selected bool
selectionYOffs int
selectionSize image.Point
}
const (
blinksPerSecond = 1
maxBlinkDuration = 10 * time.Second
@@ -1460,14 +1450,6 @@ func sign(n int) int {
}
}
// sortPoints returns a and b sorted such that a2 <= b2.
func sortPoints(a, b screenPos) (a2, b2 screenPos) {
if b.Less(a) {
return b, a
}
return a, b
}
func nullLayout(rr io.RuneReader) ([]text.Line, error) {
var rerr error
var n int