Problem: MS-Windows: CTRL-C can make Vim exit.
Solution: Check the not-a-term argument.
* Return TRUE when the --not-a-term argument was found.
*/
int
-is_not_a_term()
+is_not_a_term(void)
{
return params.not_a_term;
}
/*
* Return TRUE when the --not-a-term argument was found or the GUI is in use.
*/
- static int
-is_not_a_term_or_gui()
+ int
+is_not_a_term_or_gui(void)
{
return params.not_a_term
#ifdef FEAT_GUI
&& !VIsual_active
&& no_reason)
{
- int out_redir = !stdout_isatty
-#ifdef FEAT_GUI
- && !gui.in_use
-#endif
- ;
+ int out_redir = !stdout_isatty && !is_not_a_term_or_gui();
+
// The user may accidentally do "vim file | grep word" and then
// CTRL-C doesn't show anything. With a changed buffer give the
// message on stderr. Without any changes might as well exit.
int vim_main2(void);
void common_init(mparm_T *paramp);
int is_not_a_term(void);
+int is_not_a_term_or_gui(void);
char_u *get_gui_dialog_file(void);
int op_pending(void);
void may_trigger_safestate(int safe);
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 571,
/**/
570,
/**/