aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2024-02-12 06:26:22 -0600
committerRobin Jarry <robin@jarry.cc>2024-02-12 13:48:55 +0100
commit4d14efc470926b3e0ab61efa6b7cdabae3cf1763 (patch)
treecb4d6a60b306d2e17f4e97409d6b467bb5402d5e /app
parent345962e33ccbd18fd672f63684d8248e1211a656 (diff)
downloadaerc-4d14efc470926b3e0ab61efa6b7cdabae3cf1763.tar.gz
paste: use vaxis paste events
Replace tcell paste events with vaxis paste events Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'app')
-rw-r--r--app/aerc.go14
1 files changed, 8 insertions, 6 deletions
diff --git a/app/aerc.go b/app/aerc.go
index 8b5564a3..2d7ca2e9 100644
--- a/app/aerc.go
+++ b/app/aerc.go
@@ -399,13 +399,15 @@ func (aerc *Aerc) Event(event vaxis.Event) bool {
x, y := event.Position()
aerc.grid.MouseEvent(x, y, event)
return true
- case *tcell.EventPaste:
- if event.Start() {
- aerc.pasting = true
- }
- if event.End() {
- aerc.pasting = false
+ case vaxis.PasteStartEvent:
+ aerc.pasting = true
+ interactive, ok := aerc.SelectedTabContent().(ui.Interactive)
+ if ok {
+ return interactive.Event(event)
}
+ return false
+ case vaxis.PasteEndEvent:
+ aerc.pasting = false
interactive, ok := aerc.SelectedTabContent().(ui.Interactive)
if ok {
return interactive.Event(event)