diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-01-06 21:47:21 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-01-06 21:47:21 +0100 |
commit | 1860bde9d31bbb0ba857f6284f6332a7134030dd (patch) | |
tree | e1b03b951134208584dac0c507a53fee06e42b7d /src/ex_docmd.c | |
parent | e73b38f8e10c220a382270f69e24cad08d3bf792 (diff) |
patch 8.2.0095: cannot specify exit code for :cquitv8.2.0095
Problem: Cannot specify exit code for :cquit.
Solution: Add optional argument. (Thinca, Yegappan Lakshmanan, closes #5442)
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index a3442edbe7..de8fb49617 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -4920,8 +4920,8 @@ ex_quit(exarg_T *eap) 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); } /* |