aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 3130747e08..f64c9fded8 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -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);
}
/*