diff --git a/src/ex_cmds.c b/src/ex_cmds.c
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -4811,7 +4811,7 @@
 		    /*
 		     * Loop until 'y', 'n', 'q', CTRL-E or CTRL-Y typed.
 		     */
-		    while (do_ask)
+		    while (do_ask && global_do_ask)
 		    {
 			if (exmode_active)
 			{
@@ -4941,6 +4941,8 @@
 #endif
 				)
 			{
+			    if (global_busy)
+				global_busy = FALSE;
 			    got_quit = TRUE;
 			    break;
 			}
@@ -4958,6 +4960,7 @@
 			if (typed == 'a')
 			{
 			    do_ask = FALSE;
+			    global_do_ask = FALSE;
 			    break;
 			}
 #ifdef FEAT_INS_EXPAND
@@ -5448,6 +5451,7 @@
 	type = *eap->cmd;
     cmd = eap->arg;
     which_pat = RE_LAST;	    /* default: use last used regexp */
+    global_do_ask = TRUE;	    /* for a :s command with c flag */
 
     /*
      * undocumented vi feature:
@@ -5529,6 +5533,7 @@
 
     ml_clearmarked();	   /* clear rest of the marks */
     vim_regfree(regmatch.regprog);
+    global_do_ask = TRUE;  /* reset flag */
 }
 
 /*
diff --git a/src/globals.h b/src/globals.h
--- a/src/globals.h
+++ b/src/globals.h
@@ -1197,6 +1197,7 @@
  */
 EXTERN long	sub_nsubs;	/* total number of substitutions */
 EXTERN linenr_T	sub_nlines;	/* total number of lines changed */
+EXTERN int	global_do_ask INIT(= TRUE);	/* c flag for :s command */
 
 /* table to store parsed 'wildmode' */
 EXTERN char_u	wim_flags[4];
