aboutsummaryrefslogtreecommitdiff
path: root/widgets
AgeCommit message (Collapse)Author
2019-10-29Add manual threading to the pipelineKevin Kuehler
Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
2019-10-29Rework threading and add REFERENCESKevin Kuehler
* Implement a simplified version of the REFERENCES algorithm * Remove FormatThreads function * Instead of acting on all threads, handle each thread independently Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
2019-10-29Add threading control path to msglist.Draw()Kevin Kuehler
Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
2019-10-29widgets/msglist: Draw each row in a functionKevin Kuehler
This function can be reused by the threading code. Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
2019-10-29Start adding thread supportKevin Kuehler
* Add threading-enabled config option * Add DirectoryThreaded and FetchDirectoryThreaded types to control path * Add generic thread type for all backends to use Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
2019-10-16widgets/msgview: Reap the filter commandKevin Kuehler
The filter command shells out and returns almost immediately. Call Wait() so the filter process gets reaped. Prior to this patch, aerc creates a zombie process for every email that is viewed. Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
2019-10-16Cleanup pager processes after closing a msgviewerKevin Kuehler
A pager is spawned every time an email is viewed but not killed off when quitting the msgviewer, thus leading to process leakage. This patch fixes this by adding a Close method to the msgview widget, which is called in the close command. Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
2019-10-09Revert "Show spinner when fetching contents"Drew DeVault
This reverts commit 1339faf7881f33762c6e0a4915404e362fc51de1.
2019-10-09Show spinner when fetching contentsJeffas
The spinner should be shown when fetching the contents as we don't know at that point whether there are some messages or not.
2019-10-02Fix selected account to return for messageviewerJeffas
This ensures that the selectedaccount is returned if currently selected tab is a messageviewer. This also makes it more extensible for adding other ways of getting the selected account.
2019-09-20Add sorting functionalityJeffas
There is a command and config option. The criteria are a list of the sort criterion and each can be individually reversed. This only includes support for sorting in the maildir backend currently. The other backends are not supported in this patch.
2019-09-18Revert "Fix out-of-order messages by sorting as we display"Drew DeVault
This reverts commit ac99d9ed62644cf0259bdd79481b28c3fbcef650.
2019-09-12widgets: remove duplicate importWagner Riffel
Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
2019-09-12Add signaturesJeffas
This adds the ability for per-account signatures in the accounts.conf config file. The signature is added to emails in the editor at the bottom of the email. This includes when forwarding, replying to, and composing emails. There are two config options: signature-file and signature-cmd. The former allows a signature to be read from a file and the latter allows an arbitrary command to be executed to return the signature. The config options have been documented in aerc-config
2019-09-12Add modify-labels commandReto Brunner
This adds the event type as well as the command implementation, but no backend supports it yet.
2019-09-11Add display of unread messages in dirlistJeffas
Add an onUpdateDirs handler. This is used to invalidate the dirlist and redraw with the correct number of recent/unread/total messages is shown. A config option and formatting options are provided.
2019-09-11Fix segfault on deleteDevon Johnson
2019-09-11Add MouseableJeffas
This adds the Mouseable interface. When this is implemented for a component that item can accept and process mouseevents. At the top level when a mouse event is received it is passed to the grid's handler and then it trickles down until it reaches a component that can actually handle it, such as the tablist, dirlist or msglist. A mouse event is passed so that components can handle other things such as scrolling with the mousewheel. The components themselves then perform the necessary actions. Clicking emails in the messagelist opens them in a new tab. Textinputs can be clicked to position the cursor inside them. Mouseevents are not forwarded to the terminal at the moment. Elements which do not handle mouse events are not required to implement the Mouseable interface.
2019-09-04widgets: gofmtWagner Riffel
Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
2019-09-04widgets: rewrite references to os.SET_SEEK to io.SeekStartWagner Riffel
Os.SET_SEEK is deprecated, it's recommended to use contants from io package Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
2019-09-04all: purge redundant underscoresWagner Riffel
Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
2019-09-02Use sort.Stable for sorting displayed messagesa3v
With sort.Sort, sometimes two messages with the same timestamp will switch places every time the message list is redrawn
2019-08-30Allow custom spinner via config filePaul Spooren
Allows to set `ui.spinner=` to a string which is then split by `ui.spinner-delimiter=` (Default: comma) instead of having a hard coded animation. This implementation doesn't use INIs capabilities to split strings as it trims whitespaces breaking the default animation. Signed-off-by: Paul Spooren <mail@aparcar.org>
2019-08-29Fix out-of-order messages by sorting as we displayStephen Brennan
Sometimes I observe out-of-order messages when using a maildir inbox. It appears that the UIDs for these messages are returned out of order by the MessageStore. In order for a maildir MessageStore to return messages in most recently received order, it must have already opened all messages and parsed the date to use as a sort key. Rather than implement that, simply sort messages by time as we display. This fix shows my emails in order.
2019-08-26Add :prompt commandChristopher Vittal
Usage: :prompt <prompt> <command...> Displays the prompt on the status bar, waits for user input, then appends that input as the last argument to the command and executes it. The input is passed as one argument to the command, unless it is empty, in which case no extra argument is added.
2019-08-20Only compile regex portion of folder filterDaniel Xu
The code was trying to compile the `~` as well. In this case, it was trying to match a literal `~` to the front of the supplied regex. Fixes: 334ca89bea381 ("folder filter: only assume regex if filter is ~fmt") Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
2019-08-20folder filter: only assume regex if filter is ~fmtDrew DeVault
2019-08-20Add forwarding as attachment featureJelle Besseling
This allows a single message to be forward as attachment with the :forward -a command
2019-08-20Add addresses argument to forward commandJelle Besseling
2019-08-19Add support for <C-j> as '<Enter>' in ExLineChristopher Vittal
2019-08-19Support regex filters for foldersDaniel Xu
It's nice to be able to filter the folders displayed in the side bar. Basic string matching can get verbose with enough folders whitelisted. Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
2019-08-13Revert "add close command at global level"Drew DeVault
This reverts commit f0a0c5aa733fa66958c113465bfc5fdd3d7cc9f0.
2019-08-13add close command at global levelAditya Srivastava
2019-08-12Prevent drawing terminal with nil cmdDrew DeVault
2019-08-12Ignore scroll command when msgstore is nilJelle Besseling
Fixes ~sircmpwn/aerc2#205. Many functions do a nil check on the store, so this changes Store() so it returns nil when msglist is nil. It also places the Scroll() behind the nil check in the next-message command. https://todo.sr.ht/~sircmpwn/aerc2/205
2019-08-08Close backends prior to shutdownReto Brunner
We need some way to signal the backends that we are about to shutdown, allowing them to clean up (for example in notmuch committing the db changes). This commit implements a hook which gets called upon shutdown, providing backends implement the io.Closer interface.
2019-08-07Implement next-folder using NextPrev with amountJelle Besseling
This fixes ~sircmpwn/aerc2#182 https://todo.sr.ht/~sircmpwn/aerc2/182
2019-08-07Allow cc/bcc command to receive no argumentsDaniel Bridges
2019-08-07cc/bcc: Append to existing headers if called twiceKevin Kuehler
Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
2019-08-03Fixing #231 (alternative preferred mimetypes)Ben Cohen
2019-08-03Add cc and bcc commandsDaniel Bridges
2019-08-02Fix sending attachments with less than 512 bytesBen Burwell
2019-08-02Include body MIME terminator in multipart messagesBen Burwell
Before, the text/plain part of the multipart MIME message was not being correctly terminated with its boundary. The multipart writer writes the terminator when its Close is called, but since the call to Close() was deferred, it was not being called until after the attachments were being written resulting in the boundary not being included at all.
2019-08-02msglist: add initialization stateReto Brunner
Make the msglist aware of whether we are still initializing or not. We never stopped spinning the msglist if we didn't get any Directories back from types.ListDirectories. With this change, we can set the init state from the account and display the spinner only if we don't know whether we have directories or not and else the "no messages" string from the config.
2019-07-29Ring bell when new messages arrive0.2.0Ben Burwell
Add a "new-message-bell" option to the UI section of aerc.conf. A new hook into the message store allows the msglist widget to detect new messages being added to the displayed list. When new messages are delivered, and the new-message-bell option is enabled (as it is by default), the terminal will beep.
2019-07-27Add index option to change-tabJeffas
This allows selection of a tab using its index. It attempts to parse the given argument as a number, if it fails then it uses it as a name. Also supports relative indexes using prefixed + or -.
2019-07-27Add :detach commandGalen Abell
Add a command for removing attachments from a composed message. Syntax is :detach [path], with path being an optional argument specifying the path of one existing attachment. If no path is specified, the first attachment is removed.
2019-07-27Fix review message not filling entire spaceGalen Abell
Adding an attachment, switching to a different tab, and switching back to the review message caused the "filled space" in the review message to disappear, since there was one too many rows in the layout.
2019-07-26Add tab completion to textinputsJeffas
This adds tab completion to textinput components. They can be configured with a completion function. This function is called when the user presses <tab>. The first completion is initially shown to the user inserted into the text. Repeated presses of <tab> or <backtab> cycle through the completions list. The completions list is invalidated when any other non-tab-like key is pressed. Also changed is some logic for current completion generation so that all available commands are returned when <tab> is pressed with no current text and similarly for arguments of commands.
2019-07-26Add command history and cyclingGalen Abell
Aerc will keep track of the previous 1000 commands, which the user can cycle through using the arrow keys while in the ex-line. Pressing up will move backwards in history while pressing down will move forward.