@@ -15,9 +15,11 @@ pub struct TypableCommand {
1515
1616fn quit(
1717 cx: &mut compositor::Context,
18− _args: &[Cow<str>],
18+ args: &[Cow<str>],
1919 _event: PromptEvent,
2020) -> anyhow::Result<()> {
21+ ensure!(args.is_empty(), ":quit takes no arguments");
22+
2123 // last view and we have unsaved changes
2224 if cx.editor.tree.views().count() == 1 {
2325 buffers_remaining_impl(cx.editor)?
@@ -30,9 +32,11 @@ fn quit(
3032
3133fn force_quit(
3234 cx: &mut compositor::Context,
33− _args: &[Cow<str>],
35+ args: &[Cow<str>],
3436 _event: PromptEvent,
3537) -> anyhow::Result<()> {
38+ ensure!(args.is_empty(), ":quit! takes no arguments");
39+
3640 cx.editor.close(view!(cx.editor).id);
3741
3842 Ok(())