aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaly Ovchinnikov <v@ovch.ru>2024-03-26 07:26:40 +0000
committerRobin Jarry <robin@jarry.cc>2024-04-13 21:47:33 +0200
commit06da99cc27bd3bf3288f72d6d223ad334cdcc639 (patch)
treedc0ca2810ca1a9c7df81fe229208732bf23b3dab
parentbd489a1c9017d1d8ac6aecff98f98939007273cd (diff)
downloadaerc-06da99cc27bd3bf3288f72d6d223ad334cdcc639.tar.gz
aerc-06da99cc27bd3bf3288f72d6d223ad334cdcc639.zip
composer: block :quit command if composer is active
Prevent aerc from quiting if there is an active composer instance, unless `:quit -f` is used. Signed-off-by: Vitaly Ovchinnikov <v@ovch.ru> Acked-by: Robin Jarry <robin@jarry.cc>
-rw-r--r--app/compose.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/compose.go b/app/compose.go
index eae77e65..22d862aa 100644
--- a/app/compose.go
+++ b/app/compose.go
@@ -19,6 +19,7 @@ import (
"github.com/mattn/go-runewidth"
"github.com/pkg/errors"
+ "git.sr.ht/~rjarry/aerc/commands/mode"
"git.sr.ht/~rjarry/aerc/completer"
"git.sr.ht/~rjarry/aerc/config"
"git.sr.ht/~rjarry/aerc/lib"
@@ -120,6 +121,8 @@ func NewComposer(
return nil, err
}
+ mode.NoQuit()
+
return c, nil
}
@@ -723,6 +726,7 @@ func (c *Composer) Close() {
c.editor.Destroy()
c.editor = nil
}
+ mode.NoQuitDone()
}
func (c *Composer) Bindings() string {