aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2020-02-29remove the dirInfoUpdateRequest functionalityReto Brunner
The notmuch worker followed suit in handling the dirInfo submission manually. That removes the last user so we might as well remove the functionality.
2020-02-28Don't show empty message while sortingJeffas
This changes the ui to show the spinner while we are sorting. It only shows one line of the spinner since there are an unknown number of messages at this time.
2020-02-25toLocal template functionsqwishy
Hi. This adds a template function to convert a time to the local time zone. And modifies the default quoted_reply template to use it and show the time zone when formatting the timestamp of the quoted message. Previously, the quoted message timestamp was UTC and it would format it without the time zone. And I thought it might be a little confusing or weird to some normal people when I email them and I don't want normal people to be confused or think that I'm weird.
2020-02-25lib/msgstore: debounce directoryUpdateRequestsReto Brunner
Apparently sending an event for every incoming messageInfo slows down the application significantly. Therefore this slows down the emmision rate, on the cost of being out of date in some cases.
2020-02-19Revert "Only fetch the directory contents when we are switching directories"Reto Brunner
This reverts commit bd4df530095ee343778a59120a9e641c01010b0f. I did not properly untangle the opening / dirlist update of each other. This interferes with the imap worker, hence the revert
2020-02-16Request DirInfo whenever the unread count may have changedReto Brunner
Actions such as read / unread or the addition of new messages do change the read/unread/recent count. Hence we request an update from the workers. Workers going over the network should probably cache the information and invalidate it only if necessary
2020-02-16Only fetch the directory contents when we are switching directoriesReto Brunner
Previously, sending a DirectoryInfo assumed that a directory change happened. However we don't want that if we only want to update the unread message count.
2020-02-13lib: fix an out of bounds panic in the serverDaniel Martí
If the message doesn't contain ':', we don't properly discard the message, so we end up slicing it like msg[:-1]. This can be reproduced if one runs 'aerc foo', as the server receives 'foo' as the message. 'aerc foo' still doesn't do anything very user friendly, but at least it doesn't panic horribly. While at it, do the 'got message' log at the very beginning, so that the user can see what message the server got before reporting the command as invalid. Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
2020-01-09compose: don't call ti.tabcomplete when it is nilTimmy Douglas
2020-01-09template: add exec and wrapLeszek Cimała
2020-01-09template: remove last \n to fix additional new lines after quoteLeszek Cimała
2020-01-09add .OriginalMIMEType variable to reply templateLeszek Cimała
2020-01-09create OriginalMail structLeszek Cimała
2020-01-05FetchBodyParts: decode source in the workersReto Brunner
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
2020-01-05Don't select completions until tab has been pressedBen Burwell
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.
2020-01-04Fix double >\n when quoting empty lineSrivathsan Murali
2019-12-27Add labels to index format (%g)Reto Brunner
Exposes the notmuch tags accordingly, stubs it for the maildir worker.
2019-12-22fix invalid format stringReto Brunner
2019-12-21msglist: highlight marked messagesReto Brunner
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
2019-12-21msgstore: add marking functionalityReto Brunner
2019-12-21Show textinput completions in popoversBen Burwell
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.
2019-12-21Add popoversBen Burwell
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.
2019-12-12Break early when delete happens in outdated stateKiril Vladimiroff
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.
2019-12-07Initialize an empty message map in the message store on initializationRafael Castillo
This addresses occasional crashes when a `MessageInfo` event reached the message store before `DirectoryContents`, particularly on slower (imap) accounts.
2019-11-25Fix crash if there is no to address for %FThorben Günther
2019-11-17Complete the F rune.Srivathsan Murali
%F now shows the auth name or recepient name/address if the message is from you.
2019-11-17Add UI options to save/pipe messages with unsupported mimetypesGreg Anders
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.
2019-11-10Correct capitalization in quoted_replyDrew DeVault
2019-11-10Add some defaults for template optionsDrew DeVault
2019-11-10Add Templates with ParsingSrivathsan Murali
+ 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.
2019-10-14lib/msgstore: fix invalid callback invocationReto Brunner
creating a directory must not invoke the callback, as this is meant for the completion of the move
2019-10-14Fix tab refocus on removeJeffas
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.
2019-10-14Fix pushing invalid tabs to historyJeffas
A tab can now only be pushed onto the history if it is a selectable tab.
2019-10-09Revert "Show spinner when fetching contents"Drew DeVault
This reverts commit 1339faf7881f33762c6e0a4915404e362fc51de1.
2019-10-09Preserve sorting order in search resultsJeffas
This ensures that the search results follow the order of the current sort so that cycling throught the results proceeds in displayed order.
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-09-29Print success to socket if no error was thrownHeiko Carrasco
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.
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-18Focus new tab after removeJeffas
After removing a tab we should focus the newly selected tab if it is Interactive. This ensures things like the terminal get drawn properly.
2019-09-18Revert "Fix out-of-order messages by sorting as we display"Drew DeVault
This reverts commit ac99d9ed62644cf0259bdd79481b28c3fbcef650.
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-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: remove redundant key check, delete is no-op if key is emptyWagner Riffel
Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
2019-08-29extract search criteria parsing into the backendsReto Brunner
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-12Add delete forward <C-k> and backward <C-u>Christopher Vittal
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].
2019-08-07Implement next-folder using NextPrev with amountJelle Besseling
This fixes ~sircmpwn/aerc2#182 https://todo.sr.ht/~sircmpwn/aerc2/182
2019-08-03Remove aerc specific code from the uiNicolai Dagestad
Separatiing the ui code from aerc makes it usable as a library in other projects.
2019-07-29Fix test failuresDrew DeVault