:cquit : take an error code argument #7336

closes #2699

ex_cmds.lua: use flags consistent with similar commands such as `cnext`.

upstream discussion:
"[patch] :qcuit can take exit code"
https://groups.google.com/d/msg/vim_dev/_PjyNbUKyRc/oPgr5_ZXc6AJ
This commit is contained in:
Josh Leeb-du Toit
2017-09-29 01:12:56 +10:00
committed by Justin M. Keyes
parent bead15f10d
commit 9db42d4ce9
4 changed files with 63 additions and 19 deletions

View File

@@ -9,6 +9,7 @@
#include <string.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <inttypes.h>
#include "nvim/vim.h"
@@ -5995,7 +5996,7 @@ static void ex_quit(exarg_T *eap)
*/
static void ex_cquit(exarg_T *eap)
{
getout(1);
getout(eap->addr_count > 0 ? (int)eap->line2 : EXIT_FAILURE);
}
/*