aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/aerc.go
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/aerc.go')
-rw-r--r--widgets/aerc.go15
1 files changed, 5 insertions, 10 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go
index f0bc1ba7..cbc37795 100644
--- a/widgets/aerc.go
+++ b/widgets/aerc.go
@@ -743,18 +743,13 @@ func (aerc *Aerc) DecryptKeys(keys []openpgp.Key, symmetric bool) (b []byte, err
fmt.Sprintf("Enter password for %s (%8X)\nPress <ESC> to cancel",
ident.Name, key.PublicKey.KeyId))
- for {
- select {
- case err = <-chErr:
- if err != nil {
- return nil, err
- }
- pass := <-chPass
- err = key.PrivateKey.Decrypt([]byte(pass))
+ for err := range chErr {
+ if err != nil {
return nil, err
- default:
- aerc.ui.Tick()
}
+ pass := <-chPass
+ err = key.PrivateKey.Decrypt([]byte(pass))
+ return nil, err
}
}
return nil, err