vim-patch:8.2.0095: cannot specify exit code for :cquit (#13407)

Problem:    Cannot specify exit code for :cquit.
Solution:   Add optional argument. (Thinca, Yegappan Lakshmanan, closes vim/vim#5442)
1860bde9d3

Co-authored-by: erw7 <erw7.github@gmail.com>
This commit is contained in:
Jan Edmund Lazo
2020-11-28 15:28:57 -05:00
committed by GitHub
parent 7294a20bbc
commit a35c54b2ae
3 changed files with 41 additions and 12 deletions

View File

@@ -6317,17 +6317,14 @@ static void ex_quit(exarg_T *eap)
}
}
/*
* ":cquit".
*/
/// ":cquit".
static void ex_cquit(exarg_T *eap)
{
// this does not always pass on the exit code to the Manx compiler. why?
getout(eap->addr_count > 0 ? (int)eap->line2 : EXIT_FAILURE);
}
/*
* ":qall": try to quit all windows
*/
/// ":qall": try to quit all windows
static void ex_quit_all(exarg_T *eap)
{
if (cmdwin_type != 0) {