@@ -15,9 +15,11 @@ pub struct TypableCommand {
17 cx: &mut compositor::Context,
17 cx: &mut compositor::Context,
18− _args: &[Cow<str>],
18+ args: &[Cow<str>],
19 _event: PromptEvent,
19 _event: PromptEvent,
20) -> anyhow::Result<()> {
20) -> anyhow::Result<()> {
21+ ensure!(args.is_empty(), ":quit takes no arguments");
21 // last view and we have unsaved changes
23 // last view and we have unsaved changes
22 if cx.editor.tree.views().count() == 1 {
24 if cx.editor.tree.views().count() == 1 {
23 buffers_remaining_impl(cx.editor)?
25 buffers_remaining_impl(cx.editor)?
@@ -30,9 +32,11 @@ fn quit(
31fn force_quit(
33fn force_quit(
32 cx: &mut compositor::Context,
34 cx: &mut compositor::Context,
33− _args: &[Cow<str>],
35+ args: &[Cow<str>],
34 _event: PromptEvent,
36 _event: PromptEvent,
35) -> anyhow::Result<()> {
37) -> anyhow::Result<()> {
38+ ensure!(args.is_empty(), ":quit! takes no arguments");
36 cx.editor.close(view!(cx.editor).id);
40 cx.editor.close(view!(cx.editor).id);