aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* checkmail: error if check-mail-cmd is not setTim Culverhouse2022-08-012-0/+8
| | | | | | | Send error message to UI if check-mail-cmd is required but not set. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* pipe: fix ordering by message id for long patch seriesRobin Jarry2022-08-011-9/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | Git send-email Message-Id headers have the following format: DATETIME.PID-NUM-COMMITTER Unfortunately, when there are more than 9 patches, the patch number (NUM) is not zero-padded which makes ascii sorting invalid, e.g.: 1 10 11 12 2 3 4 5 6 7 8 9 Instead of: 1 2 3 4 5 6 7 8 9 10 11 12 We need the patches to be ordered correctly to pipe them to git am. Make sure to pad the patch number with zero characters to allow series of up to 999 patches. Only re-order messages before piping them if all the Message-Id headers look like git-send-email headers. Link: https://github.com/git/git/blob/v2.36.0/git-send-email.perl#L1197 Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Koni Marti <koni.marti@gmail.com>
* changelog: add missing entriesRobin Jarry2022-07-311-0/+2
| | | | Signed-off-by: Robin Jarry <robin@jarry.cc>
* notmuch: fix cursor movement in threaded viewKoni Marti2022-07-312-1/+7
| | | | | | | | | | | | | | | | Set the SkipSort flag when sending directory infos for counting purposes. Without this, the directory infos would trigger a directory fetch which could bring the notmuch threads out of sync with the message list. The notmuch backend sends these directory infos automatically every minute. To reproduce the weird cursor movement in notmuch's threaded view: 1. enter threaded view in notmuch 2. wait 1 min (until the auto directory infos are sent out) 3. move cursor around and notice how it jumps over threads Signed-off-by: Koni Marti <koni.marti@gmail.com> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
* autocompletion: fix slice out of bounds accessMoritz Poldrack2022-07-311-0/+3
| | | | | Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
* outgoing-cred-cmd: delay execution until an email needs to be sentStas Rudakou2022-07-313-45/+60
| | | | | | | | | | | | | | | | | | This can be useful in cases when: 1. outgoing-cred-cmd requires a user action or confirmation (e.g. when using pass with a Yubikey or similar smart card that requires a user to enter a pin or touch the device when decrypting the password) 2. A user starts aerc frequently, but not all the sessions end up with sending emails 3. So the user only wants to execute outgoing-cred-cmd when the password is really used, so the user doesn't have to enter pin or touch their Yubikey each time aerc starts Signed-off-by: Stas Rudakou <stas@garage22.net> Acked-by: Robin Jarry <robin@jarry.cc>
* doc: fix blink config exampleJoel Pickett2022-07-301-1/+1
| | | | | Signed-off-by: Joel Pickett <mail@vyryls.com> Acked-by: Robin Jarry <robin@jarry.cc>
* index: workaround for wide character printingPinghao Wu2022-07-301-0/+17
| | | | | | | | | | | | | | This is a workaround for https://todo.sr.ht/~rjarry/aerc/22, by injecting zero-width spaces in front of wide characters to make up width calculation in fmt.Sprintf. With this applied, columns will still be misaligned a little only if they are left with trailing zero-width spaces when cut. It is better than a large offset caused by each wide characters in the column. References: https://todo.sr.ht/~rjarry/aerc/22 Signed-off-by: Pinghao Wu <xdavidwuph@gmail.com> Acked-by: Koni Marti <koni.marti@gmail.com>
* changelog: fix typosRobin Jarry2022-07-261-8/+8
| | | | Signed-off-by: Robin Jarry <robin@jarry.cc>
* Add changelogRobin Jarry2022-07-263-5/+243
| | | | | | | | | | | | Git history is not for everyone. Let's introduce a user-oriented change log. Ideally, this file should be updated incrementally when adding a new feature. I have added contributors guidelines in README.md. Update release.sh to automatically generate the release tag message with the unreleased changes from the changelog. Link: https://keepachangelog.com/en/1.0.0/ Signed-off-by: Robin Jarry <robin@jarry.cc>
* imap: remove unused expunge codeTim Culverhouse2022-07-261-21/+1
| | | | | | | | | | Remove unused code in the handleDeleteMessages routine. During debugging, it was found that the channel for expunge updates was not working and that all expunge details were coming through as ExpungeUpdates. The reporting channel is unneeded. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* sort: clear sort criteria when called without argumentsTim Culverhouse2022-07-262-6/+6
| | | | | | | | | | | | Fix a regression introduced by commit c2f4404fca15 ("threading: enable filtering of server-side threads"). Prior to this commit, a :sort command (no args) would clear out the current sort criteria (or rather, apply the value from the config). Restore this functionality. Fixes: c2f4404fca15 ("threading: enable filtering of server-side threads") Reported-by: akspecs <akspecs@gmail.com> Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* sort: show warning when sort is not supportedKoni Marti2022-07-263-0/+13
| | | | | | | | | | Use the capabilities returned by the backend to check whether sort is implemented when the user tries to use the sort command. Print a warning to the log when a sort request is silently dropped by the backend. Suggested-by: |cos| Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* threads: match regular view scrolling behaviorKoni Marti2022-07-261-0/+24
| | | | | | | | | | | | Try to keep the position in the message list when scrolling through threaded messages to match the scrolling behavior of the regular view. This only needs to be implemented for the client-side threading since we have to rebuild the threads when new messages arrive. Reported-by: akspecs <akspecs@gmail.com> Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Akspecs <akspecs@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* threads: fix race warnings for client-side debouncingKoni Marti2022-07-262-5/+19
| | | | | | | | | Client-side thread debouncing happens in a different goroutine. Any function or variable that is called or accessed by this goroutine should be protected from a concurrent access. Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* threads: debounce client-side thread buildingKoni Marti2022-07-266-8/+36
| | | | | | | | | | | | | | | | Debounce client-side thread building in the message store. Debouncing is useful when multiple messages are loaded, i.e. when scrolling with PgUp/PgDown. Without the debouncing, all client-side threads will be built everytime the message store is updated which creates a noticable lag in the message list ui when client-side threading is activated. The default debouncing delay can be changed by changing 'client-threads-delay' in the UI config section. Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* check-mail: fix startup when default folder is emptyTim Culverhouse2022-07-261-3/+15
| | | | | | | | | | | | | check-mail was triggered to run at startup after a Done:FetchHeaders message. This message would only occur if there were messages in the default folder. In the case where there are no messages, check-mail would not run at startup as intended. Run check-mail even if there are no messages found in the default folder at startup. Fixes: https://todo.sr.ht/~rjarry/aerc/60 Reported-by: ~foutrelis Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* delete: improve find next functionKoni Marti2022-07-261-8/+16
| | | | | | | | | | Improve the function to find the next valid message after the delete operation. This ensures that messages at the end or when marked in the visual mode are properly dealt with. Signed-off-by: Koni Marti <koni.marti@gmail.com> Tested-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* msgstore: implement a uid-based architectureKoni Marti2022-07-265-86/+73
| | | | | | | | | | | Change the message store architecture from an index-based to a uid-based one. Key advantage of this design approach is that no reselect mechanism is required anymore since it comes with the design for free. Fixes: https://todo.sr.ht/~rjarry/aerc/43 Signed-off-by: Koni Marti <koni.marti@gmail.com> Tested-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* fix: crash when copying/moving all messagesEnsar Sarajčić2022-07-241-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This prevents dereferencing nil when updating RUE counts. This seems to happen for messages that were not yet loaded, but were selected for copy operation. This can happen when using `mark -a` command and then initiating copy operation. When such message is encountered during RUE counting, it is stopped and full recount is triggered. **Original backtrace:** Error: runtime error: invalid memory address or nil pointer dereference goroutine 1 [running]: runtime/debug.Stack() runtime/debug/stack.go:24 +0x65 git.sr.ht/~rjarry/aerc/logging.PanicHandler() git.sr.ht/~rjarry/aerc/logging/panic-logger.go:45 +0x64b panic({0x9e5f80, 0xecc360}) runtime/panic.go:844 +0x258 git.sr.ht/~rjarry/aerc/widgets.(*AccountView).onMessage(0xc0001be870, {0xb7f860?, 0xc00073b4c0?}) git.sr.ht/~rjarry/aerc/widgets/account.go:353 +0xecc git.sr.ht/~rjarry/aerc/widgets.(*AccountView).Tick(0xc0001be870) git.sr.ht/~rjarry/aerc/widgets/account.go:116 +0x6c git.sr.ht/~rjarry/aerc/widgets.(*Aerc).Tick(0xc0003ba000) git.sr.ht/~rjarry/aerc/widgets/aerc.go:144 +0x7a main.main() git.sr.ht/~rjarry/aerc/aerc.go:225 +0xbb8 Signed-off-by: Ensar Sarajčić <dev@ensarsarajcic.com> Acked-by: Robin Jarry <robin@jarry.cc>
* filters: posix compliant rewrite of calendar filterKoni Marti2022-07-241-178/+109
| | | | | | | | | | | | Rewrite of the awk calendar filter to make it posix compliant. Tested with awk --posix (awk -V = GNU Awk 5.1.1). Also added some improvements to readability and formatting. This complements commit 3ef4a3ca051a ("filters: try and make awk scripts posix compliant"). Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* seqmap: sync seqNum to uid after expungeTim Culverhouse2022-07-242-5/+20
| | | | | | | | | | | | | | This patch updates the seqNums after an Expunge operation. When an expunge operation occurs, the seqNum of the deleted message is reported. The Imap spec [0] states that an immediate decrement of all seqnums greater than the deleted occurs, even before the next reporting of an expunge update. [0]: https://datatracker.ietf.org/doc/html/rfc3501#section-7.4.1 Fixes: https://todo.sr.ht/~rjarry/aerc/61 Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Signed-off-by: Robin Jarry <robin@jarry.cc>
* delete: select new last message if last message was deletedTim Culverhouse2022-07-241-0/+7
| | | | | | | | | | If the last message is deleted, the new selection should be the last message instead of the first message. Fixes: https://todo.sr.ht/~rjarry/aerc/59 Reported-by: Sebastien Binet <s@sbinet.org> Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* delete: move tab replace logic into Done callbackTim Culverhouse2022-07-241-27/+25
| | | | | | | | | | | | Move tab replacement logic for next-message-on-delete into the callback. This also moves the Invalidate() call into the callback, and should make imap deletion UI work more reliably - there is a race condition between the worker and the UI in displaying deleted messages. This should resolve the race condition, and also only remove the MsgView tab if the message is actually deleted. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* msgstore: check if message index < 0, select 0 if soakspecs2022-07-241-1/+5
| | | | | | | | | | | Calling :prev without this check can cause the index to go below 0 if the current index is smaller than the value being scrolled / incremented by. This results in the email selector wrapping around from the top to the bottom most email in the mailbox folder due to changes in ec150f0 'store: fix Select behaviour'. Signed-off-by: akspecs <akspecs@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* msgstore: refactor NextPrevTim Culverhouse2022-07-241-7/+2
| | | | | | | | Refactor NextPrev to use already existing selection methods and bounds checking Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* store: fix Select behaviorTim Culverhouse2022-07-241-6/+13
| | | | | | | | | | Fix the behavior of the Select(index int) method to select the last message if an index > len(list) or select from bottom of list for negative indexes. Thanks: akspecs <akspecs@gmail.com> Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* logging: print init procedure and config contentsRobin Jarry2022-07-232-5/+29
| | | | | | | This may help debugging issues. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* logging: use level-based logger functionsRobin Jarry2022-07-2343-342/+268
| | | | | | | | | | | | Do not pass logger objects around anymore. Shuffle some messages to make them consistent with the new logging API. Avoid using %v when a more specific verb exists for the argument types. The loggers are completely disabled (i.e. Sprintf is not even called) by default. They are only enabled when redirecting stdout to a file. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* logging: add logger system with levelsRobin Jarry2022-07-231-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | The built-in logging system is rather basic. Implement a multi-level logger to ease interpreting the logs. Configure the loggers with prefixes and microsecond precision for timestamps. Also, prefix the messages with the source file name and line number. Because of this, enabling the logs has a performance cost. They will only be enabled when redirecting aerc stdout to a file. Here is an example output: DEBUG 2022/07/20 12:52:34.536190 worker.go:45: PostAction *types.FetchDirectoryContents DEBUG 2022/07/20 12:52:34.536329 worker.go:92: ProcessAction *types.FetchDirectoryContents(2417) DEBUG 2022/07/20 12:52:34.536407 idler.go:159: idler (0xc00017c000) [idle:false,wait:false] =>(idle) [debounce] INFO 2022/07/20 12:52:34.536432 threadbuilder.go:59: 130 threads created in 220.796µs DEBUG 2022/07/20 12:52:34.536449 worker.go:75: ProcessMessage *types.DirectoryInfo(2416) DEBUG 2022/07/20 12:52:34.536453 idler.go:159: idler (0xc00017c000) [idle:false,wait:false] <=(idle) DEBUG 2022/07/20 12:52:34.536459 worker.go:45: PostAction *types.FetchDirectoryContents INFO 2022/07/20 12:52:34.536470 open.go:30: Fetching UID list INFO 2022/07/20 12:52:34.536689 threadbuilder.go:59: 130 threads created in 201.635µs Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* imap: disable debug loggerRobin Jarry2022-07-231-2/+0
| | | | | | | | | This causes all raw email bodies to be dumped along with actual debugging messages. I don't believe we neither need nor want such a thing. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* Add git mailmapRobin Jarry2022-07-231-0/+14
| | | | | | | | Some contributors use multiple email addresses and/or invalid email addresses. Add a .mailmap file to de-duplicate and fix contributors names with git shortlog. Signed-off-by: Robin Jarry <robin@jarry.cc>
* release.sh: fine tuningRobin Jarry2022-07-231-3/+5
| | | | | | | | | | | | | | | | | | Shuffle the To/Cc/Bcc headers to avoid people from doing reply all to ~sircmpwn/aerc@lists.sr.ht. Also add Cc: aerc-devel so that the lists archives all have the base message. Unfortunately, there is no way to prevent people from doing reply all and trying to send emails to aerc-announce. Putting aerc-announce in Bcc sounds very ugly. Include the person doing the release as Bcc. sendmail -t does not have a copy-to=Sent option. Use base32 and a shorter suffix for Message-ID. base64 is ugly. Use 'vi' if $EDITOR is unset. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* tabs: make it more thread safeRobin Jarry2022-07-231-13/+68
| | | | | | | Protect the access to the tabs array and current index with a mutex. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Koni Marti <koni.marti@gmail.com>
* tabs: make fields privateRobin Jarry2022-07-236-126/+145
| | | | | | | | | | | | | | The Tabs object exposes an array of Tab objects and the current selected index in that array. The these two fields are sometimes modified in goroutines, which can lead to data races causing fatal out of bounds accesses on the tab array. Hide these fields as private API. Expose only what needs to be seen from the outside. This will prepare for protecting concurrent access with a lock in the next commit. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Koni Marti <koni.marti@gmail.com>
* tabs: rename SelectedTab to SelectedTabContentRobin Jarry2022-07-2329-36/+36
| | | | | | | | | This function returns an ui.Drawable. Use a more explicit name. This prepares for adding a new SelectedTab function which will return an ui.Tab. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Koni Marti <koni.marti@gmail.com>
* msgviewer: cleanup PartSwitcher on :toggle-headersJose Lombera2022-07-231-0/+1
| | | | | | | | | | Cleanup existing PartSwitcher before recreating a new one when command :toggle-headers is executed, ensuring existing part pagers are cleaned up. This fixes a leak in pager processes when :toggle-headers is executed repeatedly without closing the message. Signed-off-by: Jose Lombera <jose@lombera.dev> Acked-by: Koni Marti <koni.marti@gmail.com>
* imap: fix error when server returns a message without body sectionRobin Jarry2022-07-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | When opening unread emails from certain people (I won't name any names, sorry), an annoying error message is displayed on the status line: could not get section &imap.BodySectionName{BodyPartName: imap.BodyPartName{Specifier:"", Path:[]int(nil), Fields:[]string(nil), NotFields:false}, Peek:false, Partial:[]int(nil), value} This does not occur for already read messages. This issue is similar to the one that was fixed in commit 8ed95b0d2ad2 ("imap: avoid crash when replying to unread message"). This happens because the flags are updated in the callback that receives the message itself. It causes the flag update to arrive in the same channel/request. Ignore the messages that have an empty body (i.e. only containing flag updates). This is inherently racy but there seems no way to get rid of these extra messages. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Koni Marti <koni.marti@gmail.com>
* gpg: set a name for the attached pgp signature partRobin Jarry2022-07-181-1/+1
| | | | | | | | This makes it more explicit for non pgp compatible clients. Without this, they may show "unnamed part" or "noname". Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* doc: fix typosRobin Jarry2022-07-184-9/+12
| | | | | | | | These were reported by lintian when packaging aerc 0.11.0. There are probably others. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* filters: try and make awk scripts posix compliantRobin Jarry2022-07-182-16/+16
| | | | | | | | | | \x escape sequences are GNU specific. Use the octal escape code instead. filters/calendar is beyond help. It would need a complete rewrite to make it work with POSIX awk. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* Revert "fix panic on closing a tab"Moritz Poldrack2022-07-181-6/+2
| | | | | | | | | | | | | | | | | This reverts commit d7feb56cbe7b81160b580ec2f5dcaef78c7a2230. This commit introduced a regression in which upon closing any but the last tab caused an out of range panic would occur. Steps to reproduce - open a tab - open another tab - close the first tab Fixes: https://todo.sr.ht/~rjarry/aerc/58 Reported-by: akspecs <akspecs@gmail.com> Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
* binds: fix ctrl-i and ctrl-m key definitionsRobin Jarry2022-07-171-2/+2
| | | | | | | | | | | | | | | | On all terminals, ctrl-i sends a tab character (0x09). For some reason, tcell.ModCtrl+tcell.KeyCtrlI is interpreted as ctrl-tab. Similarly, ctrl-m sends a new line (0x0a) and tcell.ModCtrl+tcell.KeyCtrlM is interpreted as ctrl-enter. Remove control modifier for these two key definitions only. All others do not work without them. Fixes: 7a6c808c042b ("bindings: prepare for more modifers") Fixes: https://todo.sr.ht/~rjarry/aerc/56 Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* config: allow per-account address-book-cmdRobin Jarry2022-07-174-1/+12
| | | | | | | | When using multiple accounts, the contacts may be different. Allow using specific address book commands per account. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* completer: remove useless logger parameterRobin Jarry2022-07-172-12/+17
| | | | | | | Report the error to the user directly. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* mk: compute version deterministicallyJose Lombera2022-07-171-1/+1
| | | | | | | | | | Ensure abbreviated commit id of fixed length in computed version regardless of user's configuration. Choose length 12 as safe value. Link: https://github.com/git/git/commit/dce96489162b Signed-off-by: Jose Lombera <jose@lombera.dev> Acked-by: Moritz Poldrack <moritz@poldrack.dev> Acked-by: Robin Jarry <robin@jarry.cc>
* msgstore: do not build threads when threaded view is offTim Culverhouse2022-07-171-1/+1
| | | | | | | | | | | | | | | | | | Commit 3a614e45fce9 ("threading: enable toggle-threads for server-side threads") changed the behavior of the msgstore.buildThreads variable to reflect whether the client needs to build threads or the server will. However, a call to runThreadbuilder was not updated with an extra conditional. As a result, threads were built regardless of the state of the threadedView resulting in a large performance penalty for non-threaded views with client side threading. Only run thread builder if threaded view is enabled. Fixes: 3a614e45fce9 ("threading: enable toggle-threads for server-side threads") Reported-by: akspecs <akspecs@gmail.com> Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Akspecs <akspecs@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* lib: fix tests for 386 platformsKoni Marti2022-07-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tests in lib/structure_helpers_test.go pass on amd64 platforms but fail on 386 platforms. This can be reproduced with the following steps: 1. Create a Dockerfile in aerc's source folder: FROM i386/alpine:edge RUN apk update && apk upgrade RUN apk add --no-cache go make scdoc WORKDIR aerc COPY . . RUN make CMD make tests 2. Build the image: $ docker buildx build --platform=linux/386 -t test . 3. Run the image: $ docker run --rm --platform=linux/386 -it test The test in lib/structure_helpers_test.go will fail. If the same above steps are done with this patch applied, all tests pass. Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* send: enter no-quit mode until message is sentKoni Marti2022-07-141-0/+7
| | | | | | | | | Protect the sending of a message by entering the no-quit mode. This prevents aerc from exiting with the :quit command until the operation is done or the exit is forced. Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
* commands: implement a no-quit modeKoni Marti2022-07-143-5/+50
| | | | | | | | | | Add a mode that prevents aerc from quitting normally when an important task is performed, i.e. when sending a message. The no-quit mode will be ignored when quit is used with the -f option to force an exit. Suggested-by: ph14nix[m] Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>