aerc/lib
Tim Culverhouse 049c72393a invalidatable: always mark ui as dirty OnInvalidate
The Invalidatable struct is designed so that a widget can have a
callback function ran when it is Invalidated. This is used to cascade up
the widget tree, marking things as Invalid along the way so that only
Invalid widgets are drawn. However, this is only implemented at the grid
cell level for checks if the cell is invalidated -- and the grid cells
are never set back to a "valid" state. The effect of this is that no
matter what is invalidated, the entire UI gets drawn again.

The calling through the Invalidate callbacks creates *several* race
conditions, as Invalidate is called from several different goroutines,
and many widgets call invalidate on their parent or children.

Tcell has optimizations to only rerender screen cells that have changed
their rune and style. The only performance penalty by redrawing the
entire screen for aerc is the operations *within the aerc draw methods*.
Most of these are not expensive and have relatively no impact on
performance.

Skip all of the OnInvalidates, and directly invalidate the UI when
DoInvalidate is called by a widget. This reduces data races, and
simplifies the widget redraw logic signficantly.

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
2022-10-07 10:51:53 +02:00
..
auth lint: homogenize operations and minor fixes (gocritic) 2022-08-04 21:58:01 +02:00
calendar lint: ensure errors are at least logged (errcheck) 2022-08-04 21:57:57 +02:00
crypto pgp: enable quoted replies of encrypted messages 2022-08-31 10:10:03 +02:00
format msgstore: post MessageInfo on erroneous fetch 2022-09-20 00:03:36 +02:00
marker mark: allow multiple visual selections 2022-08-22 09:30:37 +02:00
parse open-link: make URL parsing more lenient 2022-09-13 23:58:53 +02:00
sort go.mod: change base git url 2021-11-05 10:21:45 +01:00
statusline statusline-format: add %p placeholder for current path 2022-09-19 21:25:10 +02:00
templates lint: apply new formatting rules 2022-08-01 10:44:52 +02:00
ui invalidatable: always mark ui as dirty OnInvalidate 2022-10-07 10:51:53 +02:00
uidstore Create UIDStore package 2019-07-12 11:09:47 -04:00
attachment.go forward,recall: fix charsets in part attachment 2022-10-07 10:51:53 +02:00
dirstore.go Move msgstore map to dirstore 2019-07-26 14:15:27 -04:00
history.go Add command history and cycling 2019-07-26 14:29:34 -04:00
keepalive_dummy.go format: reformat code with go 1.17 2021-12-11 23:24:08 +01:00
keepalive_linux.go format: reformat code with go 1.17 2021-12-11 23:24:08 +01:00
messageview.go view: add peek flag and propagate 2022-10-04 09:44:04 +02:00
msgstore.go aerc: use single event loop 2022-10-07 10:51:53 +02:00
oauthbearer.go lint: work nicely with wrapped errors (errorlint) 2022-08-04 21:58:04 +02:00
open.go open: allow overriding default program 2022-10-01 15:47:25 +02:00
socket.go socket: use existing socket if it is connected 2022-09-14 00:03:01 +02:00
structure_helpers.go lint: homogenize operations and minor fixes (gocritic) 2022-08-04 21:58:01 +02:00
structure_helpers_test.go lint: apply new formatting rules 2022-08-01 10:44:52 +02:00
threadbuilder.go lint: ensure errors are at least logged (errcheck) 2022-08-04 21:57:57 +02:00
xoauth2.go imap,smtp: add XOAUTH2 support 2022-10-01 15:47:33 +02:00