aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/ui/textinput.go1
-rw-r--r--lib/ui/ui.go5
-rw-r--r--widgets/spinner.go1
-rw-r--r--widgets/terminal.go1
4 files changed, 3 insertions, 5 deletions
diff --git a/lib/ui/textinput.go b/lib/ui/textinput.go
index c2acd546..8880c4c3 100644
--- a/lib/ui/textinput.go
+++ b/lib/ui/textinput.go
@@ -318,7 +318,6 @@ func (ti *TextInput) showCompletions() {
}
ti.completions, ti.prefix = ti.tabcomplete(ti.StringLeft())
ti.completeIndex = -1
- ti.Invalidate()
QueueRedraw()
}
diff --git a/lib/ui/ui.go b/lib/ui/ui.go
index ea181d33..bbaa3a29 100644
--- a/lib/ui/ui.go
+++ b/lib/ui/ui.go
@@ -17,9 +17,10 @@ type AercFuncMsg struct {
Func func()
}
-// QueueRedraw sends a nil message into the MsgChannel. Nothing will handle this
-// message, but a redraw will occur if the UI is marked as invalid
+// QueueRedraw marks the UI as invalid and sends a nil message into the
+// MsgChannel. Nothing will handle this message, but a redraw will occur
func QueueRedraw() {
+ Invalidate()
MsgChannel <- nil
}
diff --git a/widgets/spinner.go b/widgets/spinner.go
index 34c3d82e..cddbacd5 100644
--- a/widgets/spinner.go
+++ b/widgets/spinner.go
@@ -47,7 +47,6 @@ func (s *Spinner) Start() {
return
case <-time.After(200 * time.Millisecond):
atomic.AddInt64(&s.frame, 1)
- s.Invalidate()
ui.QueueRedraw()
}
}
diff --git a/widgets/terminal.go b/widgets/terminal.go
index 691b1b45..b12a6a0a 100644
--- a/widgets/terminal.go
+++ b/widgets/terminal.go
@@ -145,7 +145,6 @@ func (term *Terminal) HandleEvent(ev tcell.Event) bool {
}
switch ev := ev.(type) {
case *views.EventWidgetContent:
- term.Invalidate()
ui.QueueRedraw()
return true
case *tcellterm.EventTitle: