aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-04-27lib/ui: introduce InvalidatableSimon Ser
Many Drawable implementations have their own Invalidate and OnInvalidate functions, with an unexported onInvalidate field. However OnInvalidate and Invalidate are usually not called in the same goroutine. This results in a race on this field, e.g.: Read at 0x00c000094748 by goroutine 7: git.sr.ht/~sircmpwn/aerc2/widgets.NewDirectoryList.func1() /home/simon/src/aerc2/widgets/dirlist.go:85 +0x56 git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start.func1() /home/simon/src/aerc2/widgets/spinner.go:93 +0x1bb Previous write at 0x00c000094748 by main goroutine: [failed to restore the stack] Goroutine 7 (running) created at: git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start() /home/simon/src/aerc2/widgets/spinner.go:46 +0x8f git.sr.ht/~sircmpwn/aerc2/widgets.NewDirectoryList() /home/simon/src/aerc2/widgets/dirlist.go:37 +0x286 git.sr.ht/~sircmpwn/aerc2/widgets.NewAccountView() /home/simon/src/aerc2/widgets/account.go:50 +0x5ca git.sr.ht/~sircmpwn/aerc2/widgets.NewAerc() /home/simon/src/aerc2/widgets/aerc.go:60 +0x800 main.main() /home/simon/src/aerc2/aerc.go:65 +0x33e To fix this, introduce a new type, Invalidatable, which protects the field. Unfortunately the Drawable must be passed to the callback function in Invalidate, so we still need to re-implement this in each Invalidatable user.
2019-04-27worker/types: fix Worker.Callbacks race conditionSimon Ser
Worker.Process* functions were called in different goroutines than Worker.Post*. Protect the map with a mutex. Also make the map unexported to prevent external unprotected accesses. Worker.Process* functions used to delete items from the map. However they didn't delete the element they retrieved: callbacks[msg.InResponseTo()] was read while callbacks[msg] was deleted. I'm not sure I understand why. I tried to delete the element that was accessed - but this broke everything (UI froze at "Connecting..."). I don't believe any elements were actually removed from the map, so the new code just doesn't remove anything.
2019-04-27widgets/spinner: fix Spinner.frame raceSimon Ser
It's accessed by the goroutine which increments it and the goroutine that draws the widget at the same time. Use atomic instead. Write at 0x00c00000ebc0 by goroutine 7: git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start.func1() /home/simon/src/aerc2/widgets/spinner.go:50 +0x169 Previous read at 0x00c00000ebc0 by main goroutine: [failed to restore the stack] Goroutine 7 (running) created at: git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start() /home/simon/src/aerc2/widgets/spinner.go:44 +0x8b git.sr.ht/~sircmpwn/aerc2/widgets.NewDirectoryList() /home/simon/src/aerc2/widgets/dirlist.go:37 +0x286 git.sr.ht/~sircmpwn/aerc2/widgets.NewAccountView() /home/simon/src/aerc2/widgets/account.go:50 +0x5ca git.sr.ht/~sircmpwn/aerc2/widgets.NewAerc() /home/simon/src/aerc2/widgets/aerc.go:60 +0x800 main.main() /home/simon/src/aerc2/aerc.go:65 +0x33e
2019-04-21go get git.sr.ht/~sircmpwn/go-libvtermElias Naur
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-17Fix segfault on :select-message for unloaded messagesTom Lebreux
Signed-off-by: Tom Lebreux <tomlebreux@cock.li>
2019-04-15Re-render terminal on invalidateDrew DeVault
2019-04-10Fix segfault on :view-message for unloaded messageTom Lebreux
This also fixes segfault on :view-message on empty directory Signed-off-by: Tom Lebreux <tomlebreux@cock.li>
2019-04-07Lowercase MIME types while matching filtersGokberk Yaltirakli
2019-04-05Clear damage on each terminal.Draw callDrew DeVault
2019-04-05Fix wrong row due to typoTom Lebreux
Signed-off-by: Tom Lebreux <tomlebreux@cock.li>
2019-04-05Fix infinite loop on empty DirectoryContentsTom Lebreux
When changing to an empty directory, ml.selected is 0, and the length of ml.store.Uids is 0. The loop condition is always true so we have an infinite loop causing 100% CPU usage and prevents us to change to other directories. Signed-off-by: Tom Lebreux <tomlebreux@cock.li>
2019-04-04Show (no messages) for empty foldersDrew DeVault
2019-03-31Use better regex for identifying patchesDrew DeVault
2019-03-31Remove show-headers config optionDrew DeVault
This'll probably look different when we implement it
2019-03-31Remove unused config optionsDrew DeVault
Which are not planned for eventual implementation
2019-03-31Remove key bindings from aerc.confDrew DeVault
These were moved to binds.conf
2019-03-31Add script for sandboxing w3mDrew DeVault
2019-03-31Remove extra debug statementDrew DeVault
2019-03-31Use shell to execute filters, fix non-determinismDrew DeVault
2019-03-31Make tab width of :pipe consistentDrew DeVault
2019-03-31Improve plaintext.pyDrew DeVault
2019-03-31Implement header-regex-match filtersDrew DeVault
2019-03-31Improve error handling in message viewerDrew DeVault
Still not great but at least it tells you when something went wrong
2019-03-31Add basic filter implementationDrew DeVault
2019-03-31Decode messages before rendering themDrew DeVault
2019-03-31Add plaintext highlighter, escape ANSI in sourceDrew DeVault
2019-03-31Make message viewer real, part twoDrew DeVault
2019-03-31Rename FetchMessageBodies to FetchFullMessagesDrew DeVault
2019-03-31Make the message viewer real, part oneDrew DeVault
2019-03-31Don't parse mail in worker; send a reader insteadDrew DeVault
2019-03-31Pull BodyStructure up from IMAP workerDrew DeVault
2019-03-30Add message view commands, :closeDrew DeVault
2019-03-30Update default config/binds.confDrew DeVault
2019-03-30Minor refactoring to header viewDrew DeVault
2019-03-30Fix crash on command not foundDrew DeVault
2019-03-30Handle no configured accounts gracefullyJulian P Samaroo
Instead of throwing a runtime error, when no accounts are configured in accounts.conf, we provide an informative error message.
2019-03-30Use bold instead of inverted for header namesDrew DeVault
2019-03-30Add multipart selector mockup to msgviewerDrew DeVault
2019-03-30Actually, git uses cyan for line markersDrew DeVault
2019-03-30Update hldiff.py to match git more closelyDrew DeVault
2019-03-30Add basic message viewer mockupDrew DeVault
2019-03-30Correct color of error messagesDrew DeVault
2019-03-30Use tcell.Style.Reverse instead of black on whiteDrew DeVault
2019-03-30Implement :pipeDrew DeVault
2019-03-30Show deleted emails pending server ack in greyDrew DeVault
TODO: Don't let the user select or interact with deleted messages
2019-03-29Add body fetching support codeDrew DeVault
2019-03-21Update README.mdDrew DeVault
2019-03-21Expire status errors on inputDrew DeVault
2019-03-21term: don't mess with cursor when unfocusedDrew DeVault
2019-03-21Enable alt screen on built-in terminalDrew DeVault