Go to file
Andreas Rammhold aed847f9eb Ensure we aren't selecting negative directories
When the list of directories is empty trying to navigate in the
directory list did previously lead to a crash. With this change we
instead return early before trying to change the directory.

Example backtrace:

> panic: runtime error: index out of range [-1]
>
> goroutine 1 [running]:
> git.sr.ht/~sircmpwn/aerc/widgets.(*DirectoryList).NextPrev(0xc000160680, 0xffffffffffffffff)
> 	source/aerc/widgets/dirlist.go:285 +0xd4
> git.sr.ht/~sircmpwn/aerc/commands/account.NextPrevFolder.Execute(0xc000191040, 0xc00025c210, 0x1, 0x1, 0x0, 0xc00016f420)
> 	source/aerc/commands/account/next-folder.go:44 +0xe0
> git.sr.ht/~sircmpwn/aerc/commands.(*Commands).ExecuteCommand(0xc0000101a8, 0xc000191040, 0xc00025c210, 0x1, 0x1, 0xc000020070, 0xb46d01)
> 	source/aerc/commands/commands.go:66 +0xa7
> main.execCommand(0xc000191040, 0xc0001ca190, 0xc00025c210, 0x1, 0x1, 0xc00025c210, 0xc0003fb080)
> 	source/aerc/aerc.go:60 +0xc7
> main.main.func3(0xc00025c210, 0x1, 0x1, 0x1, 0x1)
> 	source/aerc/aerc.go:162 +0x57
> git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).BeginExCommand.func1(0xc000201db0, 0xb)
> 	source/aerc/widgets/aerc.go:382 +0x83
> git.sr.ht/~sircmpwn/aerc/widgets.(*ExLine).Event(0xc0003be100, 0xb475a0, 0xc00023cba0, 0xc00023cba0)
> 	source/aerc/widgets/exline.go:79 +0x131
> git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Event(0xc000191040, 0xb475a0, 0xc00023cba0, 0x99ee01)
> 	source/aerc/widgets/aerc.go:202 +0x4c1
> git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).simulate(0xc000191040, 0xc000036f00, 0xd, 0x10)
> 	source/aerc/widgets/aerc.go:195 +0x8d
> git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Event(0xc000191040, 0xb475a0, 0xc00023c9c0, 0x9c5a60)
> 	source/aerc/widgets/aerc.go:218 +0x3e8
> git.sr.ht/~sircmpwn/aerc/lib/ui.(*UI).Tick(0xc0001ca190, 0xa99d00)
> 	source/aerc/lib/ui/ui.go:92 +0x190
> main.main()
> 	source/aerc/aerc.go:192 +0x5f2
2020-02-07 10:40:37 -05:00
commands msgview/open: remove manual decoding 2020-01-20 09:21:29 -05:00
completer Strip trailing newline from address book entries without names 2020-01-09 14:32:22 -05:00
config config: Strongly type context type 2020-01-24 12:25:59 -05:00
doc Contextual UI Configuration 2020-01-24 10:50:21 -05:00
filters Strip carriage returns (^M) when filtering emails 2019-08-20 16:05:20 +09:00
lib compose: don't call ti.tabcomplete when it is nil 2020-01-09 14:32:12 -05:00
models add .OriginalMIMEType variable to reply template 2020-01-09 14:31:19 -05:00
templates Correct capitalization in quoted_reply 2019-11-10 13:36:25 -05:00
widgets Ensure we aren't selecting negative directories 2020-02-07 10:40:37 -05:00
worker worker/lib/parse: be more tolerant with parsing email addresses 2020-02-06 14:38:55 -05:00
.build.yml Add .build.yml 2019-07-07 18:51:51 -04:00
.gitignore Subsitute prefix in aerc.conf for install 2019-05-26 10:27:22 -04:00
LICENSE Add README.md, update license (MIT -2019) 2019-01-13 20:09:07 -05:00
Makefile Add missing man pages to uninstall target in Makefile 2019-12-24 23:55:00 +01:00
README.md Add link to scdoc 2020-02-02 11:10:38 +01:00
aerc.go Don't use current input as a possible completion 2019-12-21 09:23:22 -05:00
go.mod Contextual UI Configuration 2020-01-24 10:50:21 -05:00
go.sum Contextual UI Configuration 2020-01-24 10:50:21 -05:00

README.md

aerc

aerc is an email client for your terminal.

Join the IRC channel: #aerc on irc.freenode.net for end-user support, and #aerc-dev for development.

Building

Install the dependencies:

Then compile aerc:

$ make

aerc optionally supports notmuch. To enable it, you need to have a recent version of notmuch, including the header files (notmuch.h). Then compile aerc with the necessary build tags:

$ GOFLAGS=-tags=notmuch make

Installation

# make install
$ aerc

On its first run, aerc will copy the default config files to ~/.config/aerc and show the account configuration wizard.

If you redirect stdout to a file, logging output will be written to that file:

$ aerc > log

Resources

Send patches and questions to ~sircmpwn/aerc@lists.sr.ht.

Subscribe to release announcements on ~sircmpwn/aerc-announce

Bugs & todo here: ~sircmpwn/aerc2