diff options
author | Tim Culverhouse <tim@timculverhouse.com> | 2022-10-31 11:51:12 -0500 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-11-06 23:18:52 +0100 |
commit | 9921b33679f6b0c9d2a609fe3112178ec40b8dd2 (patch) | |
tree | 39f0c5fe6c1b103d2c1ae5f941a9de672265c68f /widgets | |
parent | 5540e3efb83e5bc50dc4600d5e66c16fca25451a (diff) | |
download | aerc-9921b33679f6b0c9d2a609fe3112178ec40b8dd2.tar.gz |
ui: invalidate ui when queuing redraw
The QueueRedraw function should always be preceeded by a call to
ui.Invalidate in order to make a redraw a occur. In one instance, this
was not done and it was possible for the UI to not redraw itself (when a
terminal closes, a UI redraw request is made but it is possible for the
UI to not be invalidated as a result of the close).
Move the call to Invalidate into the QueueRedraw function to ensure that
every QueueRedraw call will redraw the screen.
Fixes: https://todo.sr.ht/~rjarry/aerc/98
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/spinner.go | 1 | ||||
-rw-r--r-- | widgets/terminal.go | 1 |
2 files changed, 0 insertions, 2 deletions
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: |