patch 8.2.0095: cannot specify exit code for :cquit
Problem: Cannot specify exit code for :cquit.
Solution: Add optional argument. (Thinca, Yegappan Lakshmanan, closes #5442)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index a3442ed..de8fb49 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -4920,8 +4920,8 @@
static void
ex_cquit(exarg_T *eap UNUSED)
{
- getout(1); // this does not always pass on the exit code to the Manx
- // compiler. why?
+ // this does not always pass on the exit code to the Manx compiler. why?
+ getout(eap->addr_count > 0 ? (int)eap->line2 : EXIT_FAILURE);
}
/*