aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* template: remove last \n to fix additional new lines after quoteLeszek Cimała2020-01-091-0/+2
|
* add .OriginalMIMEType variable to reply templateLeszek Cimała2020-01-091-15/+18
|
* create OriginalMail structLeszek Cimała2020-01-091-12/+16
|
* FetchBodyParts: decode source in the workersReto Brunner2020-01-051-3/+14
| | | | | | | Previously the workers returned a mixture of decoded / encoded parts. This lead to a whole bunch of issues. This commit changes the msgviewer and the commands to assume parts to already be decoded
* Don't select completions until tab has been pressedBen Burwell2020-01-051-6/+8
| | | | | | | | | | | | | | | Before, pressing <Enter> when completions were visible would execute the selected completion. As soon as completions were provided, the first item would be selected. This could cause issues e.g. when changing folders: :cf <Enter> Previously, this would have selected the first folder in the list. Now, since <Tab>, <C-n>, etc have not been pressed to select the first completion, the command above simply executes `:cf `. To accomplish this, a "no-op completion" has been added at index -1.
* Fix double >\n when quoting empty lineSrivathsan Murali2020-01-041-0/+1
|
* Add labels to index format (%g)Reto Brunner2019-12-272-0/+5
| | | | Exposes the notmuch tags accordingly, stubs it for the maildir worker.
* fix invalid format stringReto Brunner2019-12-221-1/+1
|
* msglist: highlight marked messagesReto Brunner2019-12-211-2/+7
| | | | | | Note that, until we get color configuration, this means that the user *must* have the %Z verb in the index format else it'll be horribly confusing as no visual indication is provided
* msgstore: add marking functionalityReto Brunner2019-12-211-4/+127
|
* Show textinput completions in popoversBen Burwell2019-12-211-50/+223
| | | | | | Rather than showing completions inline in the text input, show them in a popover which can be scrolled by repeatedly pressing the tab key. The selected completion can be executed by pressing enter.
* Add popoversBen Burwell2019-12-213-9/+102
| | | | | | | | | | | | A popover is a special UI element which can be layered over the rest of the UI (i.e. it is painted last) and can fall anywhere on the screen, not just with the bounds of its parent's viewport/context. With these special abilities comes the restriction that only one popover may be visible on screen at once. Popovers are requested from the UI context passed to Draw calls and specify the anchor point and the desired dimensions. The popover is then fit to the available space and placed relative to the anchor point.
* Break early when delete happens in outdated stateKiril Vladimiroff2019-12-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A panic could happen when multiple delete messages are sent one after another without waiting until there are no messages left to be deleted: panic: runtime error: makeslice: len out of range goroutine 1 [running]: git.sr.ht/~sircmpwn/aerc/lib.(*MessageStore).Update(0xc000592e00, 0xa8fe60, 0xc0003340f0) /go/src/git.sr.ht/~sircmpwn/aerc/lib/msgstore.go:222 +0x5b8 git.sr.ht/~sircmpwn/aerc/widgets.(*AccountView).onMessage(0xc0000a0460, 0xa8fe60, 0xc0003340f0) /go/src/git.sr.ht/~sircmpwn/aerc/widgets/account.go:251 +0x307 git.sr.ht/~sircmpwn/aerc/widgets.(*AccountView).Tick(0xc0000a0460, 0xc0001496b0) /go/src/git.sr.ht/~sircmpwn/aerc/widgets/account.go:90 +0xa1 git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Tick(0xc0000a9f40, 0xc000020501) /go/src/git.sr.ht/~sircmpwn/aerc/widgets/aerc.go:123 +0x91 main.main() /go/src/git.sr.ht/~sircmpwn/aerc/aerc.go:182 +0x5bf The make that blows up is: uids := make([]uint32, len(store.uids)-len(msg.Uids)) This change simply checks whether the make is going to be valid before starting to work on the actual delete. If there are more messages queued to be deleted than what's left in the store, then we're obviously in an inconsistent state, ask for an update and break.
* Initialize an empty message map in the message store on initializationRafael Castillo2019-12-071-2/+3
| | | | | This addresses occasional crashes when a `MessageInfo` event reached the message store before `DirectoryContents`, particularly on slower (imap) accounts.
* Fix crash if there is no to address for %FThorben Günther2019-11-251-1/+1
|
* Complete the F rune.Srivathsan Murali2019-11-171-3/+20
| | | | | %F now shows the auth name or recepient name/address if the message is from you.
* Add UI options to save/pipe messages with unsupported mimetypesGreg Anders2019-11-171-1/+2
| | | | | | | | | | | | | | | Adds a message indicating the user's ability to :save or :pipe a message with an unsupported mimetype and also adds a selector widget (similar to the tutorial). The selector widget was previously defined in the account wizard module, so this commit breaks it out into its own module to allow for re-use. Further, modify the BeginExLine() function to take an argument that pre-populates the command line, allowing functions to initiate an ex command without executing it. Closes #95.
* Correct capitalization in quoted_replyDrew DeVault2019-11-101-12/+32
|
* Add some defaults for template optionsDrew DeVault2019-11-101-2/+2
|
* Add Templates with ParsingSrivathsan Murali2019-11-101-0/+160
| | | | | | | | | | | | | | | + Changes NewComposer to return error. + Add lib to handle templates using "text/template". + Add -T option to following commands - compose. - reply - forward + Quoted replies using templates. + Forwards as body using templates + Default templates are installed similar to filters. + Templates Config in aerc.conf. - Required templates are parsed while loading config. + Add aerc-templates.7 manual for using template data.
* lib/msgstore: fix invalid callback invocationReto Brunner2019-10-141-1/+1
| | | | | creating a directory must not invoke the callback, as this is meant for the completion of the move
* Fix tab refocus on removeJeffas2019-10-141-8/+14
| | | | | | | | Previously removing a tab would always pop from the history of tabs. This checks to see if the closing tab is the one selected, if it is then we use the history, otherwise we only need to change the selected tab if it was after (to the right of) the closing tab, in which case we just decrement the selected index.
* Fix pushing invalid tabs to historyJeffas2019-10-141-1/+4
| | | | A tab can now only be pushed onto the history if it is a selectable tab.
* Revert "Show spinner when fetching contents"Drew DeVault2019-10-091-6/+3
| | | | This reverts commit 1339faf7881f33762c6e0a4915404e362fc51de1.
* Preserve sorting order in search resultsJeffas2019-10-092-0/+18
| | | | | This ensures that the search results follow the order of the current sort so that cycling throught the results proceeds in displayed order.
* Show spinner when fetching contentsJeffas2019-10-091-3/+6
| | | | | The spinner should be shown when fetching the contents as we don't know at that point whether there are some messages or not.
* Print success to socket if no error was thrownHeiko Carrasco2019-09-291-1/+5
| | | | | | | When Reto Brunners patch is applied (which works really well for me), the user gets to see the message returned by AercServer. Since this is nil if no errors were thrown it prints "result: <nil>" to the cmd. This patch fixes that by just returning success instead of the error message when err != nil.
* Add sorting functionalityJeffas2019-09-202-1/+72
| | | | | | | | 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.
* Focus new tab after removeJeffas2019-09-181-0/+4
| | | | | After removing a tab we should focus the newly selected tab if it is Interactive. This ensures things like the terminal get drawn properly.
* Revert "Fix out-of-order messages by sorting as we display"Drew DeVault2019-09-181-1/+1
| | | | This reverts commit ac99d9ed62644cf0259bdd79481b28c3fbcef650.
* Add modify-labels commandReto Brunner2019-09-121-0/+9
| | | | | This adds the event type as well as the command implementation, but no backend supports it yet.
* Add display of unread messages in dirlistJeffas2019-09-111-0/+8
| | | | | | | 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.
* Add MouseableJeffas2019-09-116-24/+164
| | | | | | | | | | | | | | | | | | | | | | 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.
* widgets: remove redundant key check, delete is no-op if key is emptyWagner Riffel2019-09-041-6/+2
| | | | Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
* extract search criteria parsing into the backendsReto Brunner2019-08-291-4/+2
|
* Fix out-of-order messages by sorting as we displayStephen Brennan2019-08-291-1/+1
| | | | | | | | | | 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.
* Add delete forward <C-k> and backward <C-u>Christopher Vittal2019-08-121-0/+29
| | | | | | | | | | Choose the readline defaults for the behavior of these two functions/keybindings. Depending on the program, either of these can delete the whole line. Note that by default in [compose], <C-k> is bound to :prev-field<Enter>. Leave it up to the user whether or not they want to rebind the key in [compose].
* Implement next-folder using NextPrev with amountJelle Besseling2019-08-071-3/+3
| | | | | | This fixes ~sircmpwn/aerc2#182 https://todo.sr.ht/~sircmpwn/aerc2/182
* Remove aerc specific code from the uiNicolai Dagestad2019-08-031-7/+5
| | | | | Separatiing the ui code from aerc makes it usable as a library in other projects.
* Fix test failuresDrew DeVault2019-07-291-1/+1
|
* Ring bell when new messages arrive0.2.0Ben Burwell2019-07-293-4/+23
| | | | | | | | 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.
* lib/msgstore: Fix Select, Next, Prev with filterKevin Kuehler2019-07-291-8/+10
| | | | | | | | When filter is active we want to use store.results instead of store.uids, since we are dealing with a subset of the uids. Otherwise any methods involving len will have undefined behavior. Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
* Fix tabstrip over-drawing when not enough spaceJeffas2019-07-261-1/+8
| | | | | | | | Tabstrip didn't take into account the width of the context. Now, it just shows as many tabs as can fit and truncates the last one if necessary. In future it probably would be best to ensure that the selected tab is rendered on the screen.
* Add tab completion to textinputsJeffas2019-07-261-10/+74
| | | | | | | | | | | | | 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.
* Fix invalid tab state when deselecting removed tabDrew DeVault2019-07-261-1/+1
|
* Add command history and cyclingGalen Abell2019-07-261-0/+13
| | | | | | 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.
* Move msgstore map to dirstoreJeffas2019-07-261-2/+13
| | | | | | This map represents a mapping from directory names to their associated messagestores anyway so they should be under dirstore. This simply moves them there and adds some methods required to interact with them.
* Add new-email triggerJeffas2019-07-262-19/+58
| | | | | | | | | | | | | | | | | This patch sets up the trigger config section of aerc.conf. Each trigger has its own function which is called from the place where it is triggered. Currently only the new-email trigger is implemented. The triggers make use of format strings. For instance, in the new-email trigger this allows the user to select the trigger command and also the information extracted from the command and placed into their command. To actually execute the trigger commands the keypresses are simulated. Further triggers can be implemented in the future. Formatting of the command is moved to a new package.
* Fix :close on terminal panicJeffas2019-07-251-0/+5
| | | | | | | | Executing :close on a terminal would panic due to it already having been removed. This is also related to the fact that removing a tab doesn't check for whether it actually found a tab to remove or not.
* Fix grid creating too large subcontextsJeffas2019-07-251-0/+9
| | | | | | | | The grid was not checking there was enough space for the cells so would just attempt to create subcontexts that don't actually fit. This attempts to use the remaining space and then if there is no space then it just skips drawing this cell.