diff options
author | Tim Culverhouse <tim@timculverhouse.com> | 2024-07-16 08:26:37 -0500 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-08-03 17:39:57 +0200 |
commit | f8b74a9a9f1b607e20f7b5654e85b03be34ce0ed (patch) | |
tree | d8a786e770ced718cacc80ff5017a7b614694cb7 /commands | |
parent | 4743e7ff81223ed28334f8370eac6b08472791ec (diff) | |
download | aerc-f8b74a9a9f1b607e20f7b5654e85b03be34ce0ed.tar.gz |
ui: add :redraw command
Add a :redraw command to force a repaint of the entire screen.
Changelog-added: New `:redraw` command to force a repaint of the
screen.
Requested-by: Remko Tronçon <r@mko.re>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'commands')
-rw-r--r-- | commands/redraw.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/commands/redraw.go b/commands/redraw.go new file mode 100644 index 00000000..b43e45e3 --- /dev/null +++ b/commands/redraw.go @@ -0,0 +1,22 @@ +package commands + +import "git.sr.ht/~rjarry/aerc/lib/ui" + +type Redraw struct{} + +func init() { + Register(Redraw{}) +} + +func (Redraw) Context() CommandContext { + return GLOBAL +} + +func (Redraw) Aliases() []string { + return []string{"redraw"} +} + +func (Redraw) Execute(args []string) error { + ui.QueueRefresh() + return nil +} |