Make Screen generic over its display kind: Screen<Tty> and
Screen<Virtual>. The latter is for "cached" renderings we want to keep
and copy to the actual screen when the Component::draw() method is
called. Only Screen<Tty> can write to stdout and it needs an stdout
handle.
Add a generation integer field to Screen, that changes each time it is
resized. This way, we can track if "stale" areas are used and panic on
runtime (in debug mode).
Introduce a new type, Area, that keeps metadata about a subsection of a
Screen, and the generation it came from. New areas can only be created
from a Screen and by operating on an Area to create subsections of it.
This way, it's impossible to make an area refer to (x, y) cells outside
the screen generation of its provenance. If stabilised this API should
eliminate all out of bounds accesses in CellBuffers.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Tests / Test on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 12m35sDetails
Tests / Test on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 14m2sDetails
Flag and tag modifications are now somewhat typed better, and the
frontend applies them on its own on success. This means that if you set
an unseen mail as seen but it was already seen in the backend, you will
see the change locally. Previously it would remain unseen.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
When navigating the sidebar menu, if you reach the last account entry
and hit next account, nothing happens. This commit makes it so that
you're pointed to the last mailbox instead.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Tests / Test on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 12m29sDetails
Tests / Test on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 12m40sDetails
So that if you select a mail/thread entry that is currently under the
cursor (making it `highlighted`) you can also see its `selected` status.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
Tests / Test on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 8m2sDetails
Shortcut sections are shown in order, sorted by focus--as if widgets are
stacked vertically by the order you've opened them. In some widgets that
order was wrong.
Also, when a parent widget retrieved its child shortcuts, sometimes it
overwrote children sections if they both have them. This commit adds a
sealed trait ExtendShortcutsMaps that instead of overriding them, it
merges them with the child map having the priority.
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>