aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ui/textinput.go
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2024-02-12 06:26:15 -0600
committerRobin Jarry <robin@jarry.cc>2024-02-12 13:48:42 +0100
commit63b9706441719b53b3504733c51c2387fce9019d (patch)
treed541ead04cfe5082631c7bfd6bd019128cc8cc0b /lib/ui/textinput.go
parent4e26faf498b84b90ecd1af3bd6c6e1f2f3e44a6e (diff)
downloadaerc-63b9706441719b53b3504733c51c2387fce9019d.tar.gz
aerc: change event interfaces to vaxis events
Modify the function signature of Event and MouseEvent interfaces to accept vaxis events. Note that because a vaxis event is an empty interface, the implementations are not affected and the events are delivered as they were before Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'lib/ui/textinput.go')
-rw-r--r--lib/ui/textinput.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ui/textinput.go b/lib/ui/textinput.go
index 32a177e1..0bdcd435 100644
--- a/lib/ui/textinput.go
+++ b/lib/ui/textinput.go
@@ -11,6 +11,7 @@ import (
"git.sr.ht/~rjarry/aerc/config"
"git.sr.ht/~rjarry/aerc/log"
+ "git.sr.ht/~rockorager/vaxis"
)
// TODO: Attach history providers
@@ -332,7 +333,7 @@ func (ti *TextInput) OnFocusLost(onFocusLost func(ti *TextInput)) {
ti.focusLost = append(ti.focusLost, onFocusLost)
}
-func (ti *TextInput) Event(event tcell.Event) bool {
+func (ti *TextInput) Event(event vaxis.Event) bool {
ti.Lock()
defer ti.Unlock()
if event, ok := event.(*tcell.EventKey); ok {
@@ -480,7 +481,7 @@ func (c *completions) exec() {
Invalidate()
}
-func (c *completions) Event(e tcell.Event) bool {
+func (c *completions) Event(e vaxis.Event) bool {
if e, ok := e.(*tcell.EventKey); ok {
k := c.ti.completeKey
if k != nil && k.Key == e.Key() && k.Modifiers == e.Modifiers() {