From 9921b33679f6b0c9d2a609fe3112178ec40b8dd2 Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Mon, 31 Oct 2022 11:51:12 -0500 Subject: 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 Acked-by: Robin Jarry --- widgets/terminal.go | 1 - 1 file changed, 1 deletion(-) (limited to 'widgets/terminal.go') 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: -- cgit