diff options
Diffstat (limited to 'app/getpasswd.go')
-rw-r--r-- | app/getpasswd.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/app/getpasswd.go b/app/getpasswd.go index 8781bce7..e5726d91 100644 --- a/app/getpasswd.go +++ b/app/getpasswd.go @@ -3,8 +3,6 @@ package app import ( "fmt" - "github.com/gdamore/tcell/v2" - "git.sr.ht/~rjarry/aerc/config" "git.sr.ht/~rjarry/aerc/lib/ui" "git.sr.ht/~rockorager/vaxis" @@ -47,12 +45,12 @@ func (gp *GetPasswd) Invalidate() { func (gp *GetPasswd) Event(event vaxis.Event) bool { switch event := event.(type) { - case *tcell.EventKey: - switch event.Key() { - case tcell.KeyEnter: + case vaxis.Key: + switch { + case event.Matches(vaxis.KeyEnter): gp.input.Focus(false) gp.callback(gp.input.String(), nil) - case tcell.KeyEsc: + case event.Matches(vaxis.KeyEsc): gp.input.Focus(false) gp.callback("", fmt.Errorf("no password provided")) default: |