| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drain the buffered updates channel when deleting messages to prevent a
backend freeze. Unilateral update messages from the IMAP server can fill
up the buffered channel if not handled during a large operation (more
than ~50 messages).
Link: https://lists.sr.ht/~rjarry/aerc-discuss/%3CCZCPBTWI3PIW.T8MWNCBG7FGL%40disroot.org%3E
Changelog-fixed: Prevent a freeze for large-scale deletions with IMAP.
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Tested-by: Jeremy Baxter <jtbx@disroot.org>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update vaxis to 0.8.2, which adds the ability to specify any CSI-u flag
combination. Explicitly only use the disambiguate flag. This enables
aerc to have additional keybinds not previously possible (C-i, C-m)
while preventing some internal logic bugs relating to single-modifier
key presses. While these events can be useful, they are not needed in
aerc and aerc currently would need several workarounds to properly
handle them so let's just not request them in the first place.
Fixes a bug with encoding shift+space in the presence of CSI-u in the
terminal widget
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Inwit <inwit@sindominio.net>
Tested-by: Jason Cox <dev@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Defer the execution of failed IPC commands *after* the IPC socket has
been unblocked.
Fixes: fd4dd4240885 ("ipc: wait for app to be ready before accepting commands")
Fixes: https://todo.sr.ht/~rjarry/aerc/229
Changelog-fixed: Deadlock when running `aerc mailto:foo@bar.com`
without another instance of aerc already running.
Reported-by: Skejg <grolleman@zoho.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All compose commands were made available in the message viewer context
by mistake. Remove them.
This fixes a crash when the :send command is invoked while viewing
a message:
Fixes: 159fb38daf53 ("commands: refactor registration")
Fixes: https://lists.sr.ht/~rjarry/aerc-devel/%3CCZ01NTGWNUBV.14A9POG9ITJ6F%40posteo.net%3E
Changelog-fixed: Fixed crash when running `:send` with a `:preview`
tab focused.
Reported-by: Sertonix <sertonix@posteo.net>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Maarten Aertsen <maarten@nlnetlabs.nl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new setting to configure the default split layout for message list
tabs. The syntax is a bit different from the :split and :vsplit commands
since it needs to convey the direction in the value as well. I didn't
reuse split/vsplit since they are a bit confusing when used in
a configuration file.
The syntax is as follows:
message-list-split = [<direction>] <size>
The direction is optional and defaults to horizontal. The size is the
number of terminal cells that will be used to display the message list.
All these examples are equivalent:
message-list-split = horiz 12
message-list-split = h 12
message-list-split = 12
Same idea for vertical splits:
message-list-split = vertical 120
message-list-split = vert 120
message-list-split = v 120
Both :split and :vsplit commands remain usable as before. The
configuration options only affect the initial layout at startup.
Add config.SPLIT_* constants and sanitize AccountView.{Split,Vsplit}
methods.
Changelog-added: Configure default message list `:split` or `:vsplit`
on startup with `message-list-split` in `aerc.conf`.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable CSIu key encoding protocol when support is detected. This will
enable keybinds which traditionally have been unavailable due to
conflicting with other keys (C-i, C-m, C-[, etc).
Remove numlock and capslock from all keypresses to prevent interfering
with key matching.
Changelog-added: Virtually any key binding can now be configured in
`binds.conf`, including Shift+Alt+Control modifier combinations.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Refactor the bind parser to construct arbitrary modified keys instead of
only relying on built in maps. Add additional tests to cover edge cases.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit d73cf33c2c6c3e564ce8aff04acc329a06eafc54.
This breaks virtually all key bindings on foot. Almost zero ctrl-
bindings work, and even in some cases, single key binds, like n don't
register anymore.
It looked harmless, but I should probably have tested before applying
this.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Tim Culverhouse <tim@timculverhouse.com>
|
|
|
|
|
|
|
| |
Now that this feaking log folder has moved away, we can finally redirect
to a file named log.
Signed-off-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable kitty keyboard protocol when support is detected. This will
enable keybinds which traditionally have been unavailable due to
conflicting with other keys (C-i, C-m, C-[, etc).
Reported-by: Jonathan Dowland <jon+aerc-discuss@dow.land>
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Jonathan Dowland <jon@dow.land>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update vaxis to v0.7.4. Release notes:
- Fix encoding of Ctrl+z in legacy key encodings
- Add new grapheme width calc mode: nozwj where we handle VS16 and
skintone selectors but _not_ zwjs
- Enable forcing of grapheme width calc mode
- Add styled underlines to terminal widget
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Tested-by: Julio B <julio.bacel@gmail.com>
Acked-by: Moritz Poldrack <moritz@poldrack.dev>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When aerc receives a command over IPC, it quotes the arguments before
passing them on to the internal command parser. In many cases, the
parser interprets the quotes, and the command runs with the arguments
exactly as they were specified in the shell. In some cases, though, the
quotes are not interpreted and the additional quotes can cause the
command to fail. Simply eliminating the addition of quotes is not
possible because some commands need them.
Allow a command and its arguments to be specified as a single argument
in the shell. In that case, pass that argument verbatim to the internal
command parser so that it is interpreted exactly as if it had been typed
directly in aerc's command line.
Link: https://lists.sr.ht/~rjarry/aerc-devel/%3C20240203085541.27416-2-contact%40willowbarraco.fr%3E
Changelog-added: Execute IPC commands verbatim by providing the
command and its args as a single argument in the shell.
Cc: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Make .Recent, .Unread, .Exists, and .RUE work in statusline templates.
Changelog-added: Message counts are available in statusline templates.
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Remove unused TruncateHead function.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
Replace a reverse-video black-on-white border, inherited from default,
which does not match the rest of the "nord" style, with a thinner line
border, using a fg value that ties into the theme better.
Signed-off-by: Jonathan Dowland <jon@dow.land>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When split view and threading mode are enabled, the message is blinking.
First, since commit ddfa5cac1fe9 ("msgstore: fix deadlock in thread
builder"), the threadCallback is never set to nil: the thread builder
calls it continuously.
After setting it to nil, the message is still blinking once. To avoid this,
don't call the onSelect method (which points to
AccountView.updateSplitView()) from the thread builder: the message is
already displayed.
Let's rewrite Select and selectPriv:
- Select(): it takes the lock and calls the onSelect callback;
- selectPriv: the assumption is that the lock is held. It doesn't call
the onSelect callback. This function is only used by the thread builder.
Fixes: 588be1a28422 ("store: improve cursor position")
Fixes: ddfa5cac1fe9 ("msgstore: fix deadlock in thread builder")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
Forward messages from the message viewer when they are opened with :eml (e.g.
rfc822 attachments). Those messages have no associated message store and
currently :forward would complain about that.
References: https://todo.sr.ht/~rjarry/aerc/227
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reply to messages in the message viewer that were opened with :eml (e.g.
rfc822 attachments). Those messages have no associated message store and
currently :reply would complain about that.
However, we can still use the message data to create a reply, but we
would have to disable setting the replied flag and/or archiving messages
(obviously, these operations don't make sense for such messages in the
first place).
Implements: https://todo.sr.ht/~rjarry/aerc/227
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When loading binds, account-specific binds are first applied, and then
folder-specific binds are applied. However, in the process of merging
the account-specific binds with the general binds, the folder-specific
binds are lost. As a result, if both account- and folder-specific binds
exist, the folder-specific binds will do nothing when in the specified
account. The following minimal binds.conf reproduces this behavior:
[messages]
[messages:account=<ACCOUNT>]
[messages:folder=<FOLDER>]
q = :quit<Enter>
Fix this issue by ensuring contextual binds are preserved when merging.
Changelog-fixed: Allow account- and folder-specific binds to coexist.
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
Linting with golangci-lint and contrib/linters.go both started crashing
for me after upgrading go to v1.22.0 from v1.21.7. Bump golangci-lint
and golang.org/x/tools to their latest versions to fix this problem.
Signed-off-by: Jason Cox <me@jasoncarloscox.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When scripting for the mail-received hook, it can be useful to identify
a mail in a maildir. In that case the Message-ID might be one of the
most useful parameters to go for identifying the file of a message.
Changelog-changed: Add Message-ID to the variables of
`[hooks].mail-received`.
Suggested-by: Kirill Chibisov <contact@kchibisov.com>
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To be consistent with stylesets for the rest of aerc's UI, settings in
the [viewer] section now only override the default colorize theme.
Implements: https://todo.sr.ht/~rjarry/aerc/222
Changelog-changed: The `[viewer]` section of stylesets now preserve
default values as documented in `aerc-stylesets(7)` unless explicitly
overridden.
Requested-by: Karel Balej <balejk@matfyz.cz>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Karel Balej <balejk@matfyz.cz>
Tested-by: Matěj Cepl <mcepl@cepl.eu>
Tested-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current default theme is unusable on light backgrounds. Some colors
are too light and are almost invisible.
Use only palette colors to ensure that everything is customizable by the
user.
I tested this with white on black, grey on dark purple, black on yellow,
black on white. Text remains readable everywhere.
Update stylesets that don't use these new defaults to explicitly
override them.
Changelog-changed: The default `colorize` theme has been changed to
use the base terminal colors.
Cc: Jason Cox <me@jasoncarloscox.com>
Reported-by: Matěj Cepl <mcepl@cepl.eu>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
|
|
|
|
|
|
|
|
|
| |
Include the styleset filepath and exact statement that caused the error.
Remove the "failed to load config: " prefix in the error message. The
line is often very long already.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The default styleset and ui settings are quite dull and don't make use
of the "newer" features that have been added to aerc in the past two
years.
Change the default styleset to something more colorful that renders
correctly on both dark and light backgrounds. Change the default ui
settings to get something more appealing to new users.
Save the previous default color theme to a new `monochrome` styleset.
Changelog-changed: The default `[ui]` settings and the `default`
styleset have changed extensively. A no-color theme can be restored
with the `monochrome` styleset.
Cc: Marc Coquand <marc@mccd.space>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
|
|
|
|
|
|
|
|
| |
Some settings are supported and documented but their description and
default values are not present in the default aerc.conf file. Add them.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
|
|
|
|
|
|
|
| |
This has nothing to do at the root of the source tree.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Acked-by: Bence Ferdinandy <bence@ferdinandy.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a command to allow for reintroduction of messages into the transport
system. This means taking a message and forwarding it to new recipients
as is including original headers. The fact that the message has been
bounced is indicated by the prepend of *Resent-* headers in accordance
with RFC 2822. The bounced message is not stored in the sent mailbox.
Also add an `-A` switch to allow for bouncing using different account
than the one currently selected.
Also add default keybind and documentation entry for this command.
The mentioned RFC also recognizes *Resent-Cc* and *Resent-Bcc* headers
which might be an interesting continuation of this -- currently all
recipients are specified in *Resent-To*. Also more control over the
*Resent-From* header value could be implemented.
This command is strongly inspired by (neo)mutt's `bounce`.
Implements: https://todo.sr.ht/~rjarry/aerc/115
Changelog-added: `:bounce` command to reintroduce messages into the
transport system.
Signed-off-by: Karel Balej <balejk@matfyz.cz>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Make the function already present in app/compose.go reusable while also
changing its signature for it not to require involvement of a Composer
instance.
Signed-off-by: Karel Balej <balejk@matfyz.cz>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the code which handles the preparation of a sender into which the
message can be written into lib to allow for reuse. Also hide the
sending backend a bit more from the `:send` command code by introducing
a NewSender function which determines which backend should be used and
invokes the appropriate sender factory function.
Rename send() to sendHelper() to avoid collision.
Signed-off-by: Karel Balej <balejk@matfyz.cz>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
JMAP is able to automatically determine sender and recipients based on
the message headers after it is submitted for sending. However this
means that it is not possible to send a message with the From header not
matching the account with this approach (or to send the message to
recipients not listed in the headers). Luckily, JMAP allows setting the
envelope containing the envelope sender and recipients manually. Modify
the code to do so.
Also bump go-jmap to include a fix needed for this to work.
Signed-off-by: Karel Balej <balejk@matfyz.cz>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
| |
Remove all use of the sendCtx struct and instead only pass the minimum
required data to sender factory functions. Also introduce shouldCopy
variable instead of evaluating all copying prerequisities every time.
Fix preposition in SMTP error message.
Signed-off-by: Karel Balej <balejk@matfyz.cz>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
Rename several variables to better distinguish their meaning.
Signed-off-by: Karel Balej <balejk@matfyz.cz>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Use the StartWithSize method to start the terminal with the appropriate
size. This prevents multiple WINCH signals from being sent to the pty at
startup
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update Vaxis to v0.7.2 to gain performance improvements and StyledString
parsing. The Vaxis parser fully accounts for the terminal's capability
to display wide characters.
Use the Vaxis StyledString parser to parse and style ansi-encoded
strings. Remove unneeded code and tests.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
Update color value reference in documentation
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
Set the window title using Vaxis at UI initialization.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
All references to tcell have been replaced with vaxis
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
Replace all tcell.EventMouse events with vaxis mouse events
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
Replace tcell paste events with vaxis paste events
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Replace tcell terminal with the vaxis terminal. The vaxis terminal is a
port of tcell term.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
Replace all tcell.Style objects with vaxis.Style objects
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
Replace all instances of tcell key usage with vaxis keys
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
| |
Replace the Fill implementation with vaxis style objects
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Use Vaxis library directly to initialize the UI, dropping the need for a
tcell Screen implementation
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
| |
Remove references to tcell.Screen or views.Viewports. Convert Contexts
and the core UI struct to use Vaxis objects only.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
| |
Modify the function signature of Event and MouseEvent interfaces to
accept vaxis events. Note that because a vaxis event is an empty
interface, the implementations are not affected and the events are
delivered as they were before
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement inline image viewing for jpeg, png, bmp, tiff, and webp
formats. When a user has no configured image filter and the image is
supported and the terminal has either sixel or kitty image protocol
support, the image will be displayed in the message viewer.
Always clear the screen before each draw. This call is necessary in
vaxis to allow for images to be cleared properly between renders. There
is no performance impact: the call only resets each cell to a blank
cell, and aerc will redraw each one already.
Changelog-added: Inline image previews when no filter is defined for
`image/*` and the terminal supports it.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
| |
Create and expose a vaxis.Window object with each Context. vaxis.Windows
are used for creating local coordinates (similar to the views.View API
that tcell provides).
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace tcell with vaxis. Vaxis provides several new features (none of
which are included in this commit). All behavior should be exactly the
same as previous, with one exception:
Vaxis does not have an internal terminfo library. Some terminals will
now have RGB that didn't before, as well as any other feature that
was falling back to some unknown state.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Robin Jarry <robin@jarry.cc>
|