aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add initial compose widgetDrew DeVault2019-05-121-2/+3
|
* Refactor ctx stashing out of exlineDrew DeVault2019-05-111-0/+2
|
* Split ex line text handling into dedicated widgetDrew DeVault2019-05-111-0/+136
|
* lib/ui: fix UI.Exit race conditionSimon Ser2019-05-051-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UI.Exit can be accessed from goroutines drawing, goroutines executing commands and goroutines waiting for events. Write at 0x00c0002b2040 by main goroutine: main.main.func1() /home/simon/src/aerc2/aerc.go:76 +0x33d git.sr.ht/~sircmpwn/aerc2/widgets.(*Aerc).BeginExCommand.func1() /home/simon/src/aerc2/widgets/aerc.go:245 +0x89 git.sr.ht/~sircmpwn/aerc2/widgets.(*ExLine).Event() /home/simon/src/aerc2/widgets/exline.go:131 +0x442 git.sr.ht/~sircmpwn/aerc2/widgets.(*Aerc).Event() /home/simon/src/aerc2/widgets/aerc.go:116 +0x83c git.sr.ht/~sircmpwn/aerc2/widgets.(*Aerc).simulate() /home/simon/src/aerc2/widgets/aerc.go:109 +0x12a git.sr.ht/~sircmpwn/aerc2/widgets.(*Aerc).Event() /home/simon/src/aerc2/widgets/aerc.go:142 +0x722 git.sr.ht/~sircmpwn/aerc2/lib/ui.(*UI).Tick() /home/simon/src/aerc2/lib/ui/ui.go:75 +0x33f main.main() /home/simon/src/aerc2/aerc.go:94 +0x497 Previous read at 0x00c0002b2040 by goroutine 19: git.sr.ht/~sircmpwn/aerc2/lib/ui.Initialize.func1() /home/simon/src/aerc2/lib/ui/ui.go:45 +0x97 Goroutine 19 (running) created at: git.sr.ht/~sircmpwn/aerc2/lib/ui.Initialize() /home/simon/src/aerc2/lib/ui/ui.go:44 +0x372 main.main() /home/simon/src/aerc2/aerc.go:87 +0x3a9
* lib/ui: fix Grid race conditionSimon Ser2019-05-051-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was is more complicated than others. The cells list is accessed by multiple goroutines: - Some change the Grid's contents via AddChild/RemoveChild - Some call Draw - Some invalidate the grid via Invalidate Invalidate calls are tricky to handle because they will also invalidate all child cells. This will inturn trigger the cellInvalidated callback, which needs to read the list of cells. For this reason, we use a sync.RWLock which allows multiple concurrent reads. Below is the race fixed by this commit. Read at 0x00c0000bc3d0 by goroutine 7: git.sr.ht/~sircmpwn/aerc2/lib/ui.(*Grid).cellInvalidated() /home/simon/src/aerc2/lib/ui/grid.go:181 +0x45 git.sr.ht/~sircmpwn/aerc2/lib/ui.(*Grid).cellInvalidated-fm() /home/simon/src/aerc2/lib/ui/grid.go:179 +0x55 git.sr.ht/~sircmpwn/aerc2/lib/ui.(*Invalidatable).DoInvalidate() /home/simon/src/aerc2/lib/ui/invalidatable.go:22 +0x85 git.sr.ht/~sircmpwn/aerc2/lib/ui.(*Bordered).contentInvalidated-fm() /home/simon/src/aerc2/lib/ui/borders.go:39 +0x56 git.sr.ht/~sircmpwn/aerc2/lib/ui.(*Invalidatable).DoInvalidate() /home/simon/src/aerc2/lib/ui/invalidatable.go:22 +0x85 git.sr.ht/~sircmpwn/aerc2/widgets.NewDirectoryList.func1() /home/simon/src/aerc2/widgets/dirlist.go:81 +0x55 git.sr.ht/~sircmpwn/aerc2/lib/ui.(*Invalidatable).DoInvalidate() /home/simon/src/aerc2/lib/ui/invalidatable.go:22 +0x85 git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start.func1() /home/simon/src/aerc2/widgets/spinner.go:88 +0x82 Previous write at 0x00c0000bc3d0 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 +0x98 git.sr.ht/~sircmpwn/aerc2/widgets.NewDirectoryList() /home/simon/src/aerc2/widgets/dirlist.go:37 +0x28b git.sr.ht/~sircmpwn/aerc2/widgets.NewAccountView() /home/simon/src/aerc2/widgets/account.go:49 +0x5ca git.sr.ht/~sircmpwn/aerc2/widgets.NewAerc() /home/simon/src/aerc2/widgets/aerc.go:60 +0x807 main.main() /home/simon/src/aerc2/aerc.go:65 +0x33e
* lib/msgstore: protect with a mutexSimon Ser2019-04-291-3/+22
| | | | | | MessageStore has a lot of exported fields that can be read from the outside. Each read must be protected, because a call from Update could happen at any time.
* lib/ui: fix GridCell.invalid raceSimon Ser2019-04-291-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is read/written from different goroutines. Write at 0x00c00009c6f0 by goroutine 7: git.sr.ht/~sircmpwn/aerc2/lib/ui.(*Grid).cellInvalidated() /home/simon/src/aerc2/lib/ui/grid.go:189 +0x122 git.sr.ht/~sircmpwn/aerc2/lib/ui.(*Grid).cellInvalidated-fm() /home/simon/src/aerc2/lib/ui/grid.go:178 +0x55 git.sr.ht/~sircmpwn/aerc2/lib/ui.(*Invalidatable).DoInvalidate() /home/simon/src/aerc2/lib/ui/invalidatable.go:22 +0x85 git.sr.ht/~sircmpwn/aerc2/lib/ui.(*Bordered).contentInvalidated-fm() /home/simon/src/aerc2/lib/ui/borders.go:39 +0x56 git.sr.ht/~sircmpwn/aerc2/lib/ui.(*Invalidatable).DoInvalidate() /home/simon/src/aerc2/lib/ui/invalidatable.go:22 +0x85 git.sr.ht/~sircmpwn/aerc2/widgets.NewDirectoryList.func1() /home/simon/src/aerc2/widgets/dirlist.go:81 +0x55 git.sr.ht/~sircmpwn/aerc2/lib/ui.(*Invalidatable).DoInvalidate() /home/simon/src/aerc2/lib/ui/invalidatable.go:22 +0x85 git.sr.ht/~sircmpwn/aerc2/widgets.(*Spinner).Start.func1() /home/simon/src/aerc2/widgets/spinner.go:88 +0x82 Previous write at 0x00c00009c6f0 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 +0x98 git.sr.ht/~sircmpwn/aerc2/widgets.NewDirectoryList() /home/simon/src/aerc2/widgets/dirlist.go:37 +0x28b git.sr.ht/~sircmpwn/aerc2/widgets.NewAccountView() /home/simon/src/aerc2/widgets/account.go:49 +0x5ca git.sr.ht/~sircmpwn/aerc2/widgets.NewAerc() /home/simon/src/aerc2/widgets/aerc.go:60 +0x807 main.main() /home/simon/src/aerc2/aerc.go:65 +0x33e
* lib/ui: introduce InvalidatableSimon Ser2019-04-274-32/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Make message viewer real, part twoDrew DeVault2019-03-311-1/+1
|
* Rename FetchMessageBodies to FetchFullMessagesDrew DeVault2019-03-311-2/+2
|
* Make the message viewer real, part oneDrew DeVault2019-03-311-1/+15
|
* Don't parse mail in worker; send a reader insteadDrew DeVault2019-03-311-7/+6
|
* Pull BodyStructure up from IMAP workerDrew DeVault2019-03-311-1/+15
|
* Add basic message viewer mockupDrew DeVault2019-03-301-0/+10
|
* Use tcell.Style.Reverse instead of black on whiteDrew DeVault2019-03-303-10/+14
|
* Show deleted emails pending server ack in greyDrew DeVault2019-03-301-2/+15
| | | | TODO: Don't let the user select or interact with deleted messages
* Add body fetching support codeDrew DeVault2019-03-291-6/+71
|
* Remove unused import from msgstore.goDrew DeVault2019-03-211-2/+0
|
* Implement :delete-messageDrew DeVault2019-03-201-3/+26
|
* Add :term-closeDrew DeVault2019-03-172-3/+7
|
* Move exline handling up to aerc, add :termDrew DeVault2019-03-171-3/+5
|
* Add basic terminal widgetDrew DeVault2019-03-172-0/+3
|
* Add TODO to msgstore.goDrew DeVault2019-03-151-1/+1
|
* Move MessageStore into its own fileDrew DeVault2019-03-151-0/+86
|
* Add :quit commandDrew DeVault2019-03-151-5/+0
|
* Implement the Container interface in lib/ui/Drew DeVault2019-01-205-7/+26
|
* Merge lib/ui/interfaces.go and add anotherDrew DeVault2019-01-203-30/+42
|
* Make repeated invalidations more efficientDrew DeVault2019-01-141-0/+10
|
* Add cursor handling in ex lineDrew DeVault2019-01-141-8/+9
|
* Revert "Add abstract list, update dirlist accordingly"Drew DeVault2019-01-132-111/+0
| | | | This reverts commit 3157897c1a20e5638feaf56e753b7886bc4ba267.
* Revert "Render selected list item differently"Drew DeVault2019-01-131-1/+0
| | | | This reverts commit 60284850f22624a03996e882fcfd6aeb2af88b93.
* Render selected list item differentlyDrew DeVault2019-01-131-0/+1
|
* Add abstract list, update dirlist accordinglyDrew DeVault2019-01-132-0/+111
|
* refactor lib/ui/tab to ensure staying in boundsMarkus Ongyerth2018-06-131-8/+21
| | | | | | | | Fix a few potential out of bounds by placing proper checks, which should be relevant if all tabs are removed for some reason. Also avoid iterating all tabs in the invalidate handler, since we are only interested in whether it's the selected tab either way
* Fix tab invalidation bugsDrew DeVault2018-06-111-1/+5
|
* Apply gofmtDrew DeVault2018-06-113-7/+7
|
* Clean up some old codeDrew DeVault2018-06-112-10/+6
|
* Move sidebar into account tabsDrew DeVault2018-06-111-4/+4
| | | | | This is accomplished through a bit of a hack, the statusbar is able to be a child of multiple dudes
* Use default color for selected tabDrew DeVault2018-06-071-3/+9
|
* switch to tcell from termboxMarkus Ongyerth2018-06-018-101/+105
| | | | | | | | | | | | | This is a simple mostly straight forward switch to tcell in favor of termbox. It uses the tcell native api (not the compat layer) but does not make use of most features. Further changes should include moving to tcell's views.TextArea and the general built in widget behaviour instead of the current ad hoc implementation. Regression: Cursor isn't shown in ex-line
* Pull main aerc UI into widgetDrew DeVault2018-02-273-13/+38
|
* Add stack UI containerDrew DeVault2018-02-272-7/+80
|
* Split UI library and widgetsDrew DeVault2018-02-268-0/+663