aboutsummaryrefslogtreecommitdiffstats
path: root/app/dirlist.go
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2024-02-12 06:26:23 -0600
committerRobin Jarry <robin@jarry.cc>2024-02-12 13:48:56 +0100
commit58f94fa0a1333dfccfb24f90b22506b29a64397b (patch)
treeb2b9d4e89560f3c022807f6e1e66cc83f2c58de9 /app/dirlist.go
parent4d14efc470926b3e0ab61efa6b7cdabae3cf1763 (diff)
downloadaerc-58f94fa0a1333dfccfb24f90b22506b29a64397b.tar.gz
mouse: use vaxis mouse events
Replace all tcell.EventMouse events with vaxis mouse events Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'app/dirlist.go')
-rw-r--r--app/dirlist.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/app/dirlist.go b/app/dirlist.go
index e9228374..71db2b6a 100644
--- a/app/dirlist.go
+++ b/app/dirlist.go
@@ -8,8 +8,6 @@ import (
"sort"
"time"
- "github.com/gdamore/tcell/v2"
-
"git.sr.ht/~rjarry/aerc/config"
"git.sr.ht/~rjarry/aerc/lib"
"git.sr.ht/~rjarry/aerc/lib/parse"
@@ -376,16 +374,16 @@ func (dirlist *DirectoryList) drawScrollbar(ctx *ui.Context) {
}
func (dirlist *DirectoryList) MouseEvent(localX int, localY int, event vaxis.Event) {
- if event, ok := event.(*tcell.EventMouse); ok {
- switch event.Buttons() {
- case tcell.Button1:
+ if event, ok := event.(vaxis.Mouse); ok {
+ switch event.Button {
+ case vaxis.MouseLeftButton:
clickedDir, ok := dirlist.Clicked(localX, localY)
if ok {
dirlist.Select(clickedDir)
}
- case tcell.WheelDown:
+ case vaxis.MouseWheelDown:
dirlist.Next()
- case tcell.WheelUp:
+ case vaxis.MouseWheelUp:
dirlist.Prev()
}
}