aboutsummaryrefslogtreecommitdiff
path: root/go/ui
diff options
context:
space:
mode:
Diffstat (limited to 'go/ui')
-rw-r--r--go/ui/buffer.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/go/ui/buffer.go b/go/ui/buffer.go
index c44bbdd0..50044163 100644
--- a/go/ui/buffer.go
+++ b/go/ui/buffer.go
@@ -47,7 +47,7 @@ func NewBuffer(x, y int, width, height int) *Buffer {
func (b *Buffer) render() *ebiten.Image {
img := ebiten.NewImage(b.Width, b.Height)
img.Fill(b.bg)
- var y float64 = -b.font.Size
+ y := -b.font.Size
for i, line := range b.lines[b.pos:] {
_, h := text.Measure(line, b.font, b.font.Size*b.lineSpacing)
y += h
@@ -177,9 +177,7 @@ func (b *StackBuffer) RemoveLast() {
// Remove potential highlight
i := len(b.actions) - 1
- if _, found := b.highlights[i]; found {
- delete(b.highlights, i)
- }
+ delete(b.highlights, i)
b.actions = b.actions[:i]
}