aboutsummaryrefslogtreecommitdiff
path: root/widgets/terminal.go
AgeCommit message (Collapse)Author
2019-06-01Use forked version of tcellDrew DeVault
2019-06-01widgets/terminal: Don't segfault on resizeKevin Kuehler
vterm.Write and vterm.SetSize race when the window resizes, which causing the underlying library to segfault. Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
2019-05-26Update terminal color handling per vterm changesDrew DeVault
2019-05-26Update to the latest go-libvtermDrew DeVault
2019-05-19widgets/terminal: fix damage race conditionSimon Ser
Terminal.damage is accessed when drawing and when invalidating the widget. For this reason we need to protect it with a mutex. This seems to fix various damage issues I've been experiencing (where some regions of the terminal weren't correctly repainted). Race detector trace: Read at 0x00c0000c6670 by main goroutine: git.sr.ht/~sircmpwn/aerc/widgets.(*Terminal).Draw() /home/simon/src/aerc/widgets/terminal.go:292 +0x191 git.sr.ht/~sircmpwn/aerc/lib/ui.(*Grid).Draw() /home/simon/src/aerc/lib/ui/grid.go:117 +0x575 git.sr.ht/~sircmpwn/aerc/lib/ui.(*Grid).Draw() /home/simon/src/aerc/lib/ui/grid.go:117 +0x575 git.sr.ht/~sircmpwn/aerc/widgets.(*MessageViewer).Draw() /home/simon/src/aerc/widgets/msgviewer.go:231 +0x253 git.sr.ht/~sircmpwn/aerc/lib/ui.(*TabContent).Draw() /home/simon/src/aerc/lib/ui/tab.go:124 +0x12e git.sr.ht/~sircmpwn/aerc/lib/ui.(*Grid).Draw() /home/simon/src/aerc/lib/ui/grid.go:117 +0x575 git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Draw() /home/simon/src/aerc/widgets/aerc.go:95 +0x5a git.sr.ht/~sircmpwn/aerc/lib/ui.(*UI).Tick() /home/simon/src/aerc/lib/ui/ui.go:93 +0x1dd main.main() /home/simon/src/aerc/aerc.go:105 +0x539 Previous write at 0x00c0000c6670 by goroutine 37: git.sr.ht/~sircmpwn/aerc/widgets.(*Terminal).onDamage-fm() /home/simon/src/aerc/widgets/terminal.go:429 +0x131 git.sr.ht/~sircmpwn/go-libvterm._go_handle_damage() /home/simon/go/pkg/mod/git.sr.ht/~sircmpwn/go-libvterm@v0.0.0-20190421201021-3184f6f13687/vterm.go:481 +0xf9 git.sr.ht/~sircmpwn/go-libvterm._cgoexpwrap_5e22200b58b7__go_handle_damage() _cgo_gotypes.go:731 +0x58 runtime.call32() /usr/lib/go/src/runtime/asm_amd64.s:519 +0x3a git.sr.ht/~sircmpwn/go-libvterm.(*VTerm).Write.func1() /home/simon/go/pkg/mod/git.sr.ht/~sircmpwn/go-libvterm@v0.0.0-20190421201021-3184f6f13687/vterm.go:329 +0x9d git.sr.ht/~sircmpwn/go-libvterm.(*VTerm).Write() /home/simon/go/pkg/mod/git.sr.ht/~sircmpwn/go-libvterm@v0.0.0-20190421201021-3184f6f13687/vterm.go:329 +0x7f git.sr.ht/~sircmpwn/aerc/widgets.NewTerminal.func1() /home/simon/src/aerc/widgets/terminal.go:131 +0x18c Goroutine 37 (running) created at: git.sr.ht/~sircmpwn/aerc/widgets.NewTerminal() /home/simon/src/aerc/widgets/terminal.go:121 +0x23f git.sr.ht/~sircmpwn/aerc/widgets.NewMessageViewer() /home/simon/src/aerc/widgets/msgviewer.go:147 +0xfbe git.sr.ht/~sircmpwn/aerc/commands/account.ViewMessage() /home/simon/src/aerc/commands/account/view-message.go:26 +0x4a4 git.sr.ht/~sircmpwn/aerc/commands.(*Commands).ExecuteCommand() /home/simon/src/aerc/commands/commands.go:47 +0x1f0 main.main.func1() /home/simon/src/aerc/aerc.go:76 +0x205 git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).BeginExCommand.func1() /home/simon/src/aerc/widgets/aerc.go:262 +0x89 git.sr.ht/~sircmpwn/aerc/widgets.(*ExLine).Event() /home/simon/src/aerc/widgets/exline.go:47 +0x222 git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Event() /home/simon/src/aerc/widgets/aerc.go:133 +0x83c git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).simulate() /home/simon/src/aerc/widgets/aerc.go:126 +0x12a git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Event() /home/simon/src/aerc/widgets/aerc.go:148 +0x766 git.sr.ht/~sircmpwn/aerc/lib/ui.(*UI).Tick() /home/simon/src/aerc/lib/ui/ui.go:86 +0x11b main.main() /home/simon/src/aerc/aerc.go:105 +0x539
2019-05-17s/aerc2/aerc/gDrew DeVault
2019-05-12Implement :{next,prev}-field in compose viewDrew DeVault
2019-05-11"Press any key to close" for completed processesDrew DeVault
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-15Re-render terminal on invalidateDrew DeVault
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-03-30Fix crash on command not foundDrew DeVault
2019-03-30Implement :pipeDrew 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
2019-03-21Make terminal closure thread safeDrew DeVault
2019-03-21Use GetCursorPos instead of stored positionDrew DeVault
2019-03-21Skip writes if term is closedDrew DeVault
2019-03-21Improve cursor handling in embedded terminalDrew DeVault
2019-03-21Fix cursor handling in embedded terminalDrew DeVault
2019-03-21Forward key events to child terminalDrew DeVault
2019-03-17moar colorsDrew DeVault
2019-03-17s/:term-close/:close/gDrew DeVault
2019-03-17Wrap Terminal in TermHostDrew DeVault
2019-03-17Add :term-closeDrew DeVault
2019-03-17Handle terminal title, login shellDrew DeVault
2019-03-17Fix terminal colors; wait until tty size is knownDrew DeVault
2019-03-17Add basic terminal widgetDrew DeVault