diff src/ex_getln.c @ 29481:34bb46847ba0 v9.0.0082

patch 9.0.0082: cannot interrupt global command from command line Commit: https://github.com/vim/vim/commit/3cfae39b087c2724991d385e5e8ee7d011aa8e99 Author: zeertzjq <zeertzjq@outlook.com> Date: Tue Jul 26 17:48:13 2022 +0100 patch 9.0.0082: cannot interrupt global command from command line Problem: Cannot interrupt global command from command line. Solution: Reset got_int in another place. (closes https://github.com/vim/vim/issues/10739)
author Bram Moolenaar <Bram@vim.org>
date Tue, 26 Jul 2022 19:00:03 +0200
parents b43cb3fd0c7b
children 2a327999c05c
line wrap: on
line diff
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -1786,8 +1786,6 @@ getcmdline_int(
 				// that occurs while typing a command should
 				// cause the command not to be executed.
 
-	got_int = FALSE;	// avoid infinite Ctrl-C loop in Ex mode
-
 	// Trigger SafeState if nothing is pending.
 	may_trigger_safestate(xpc.xp_numfiles <= 0);
 
@@ -1850,7 +1848,8 @@ getcmdline_int(
 		&& firstc != '@'
 #endif
 #ifdef FEAT_EVAL
-		&& !break_ctrl_c
+		// do clear got_int in Ex mode to avoid infinite Ctrl-C loop
+		&& (!break_ctrl_c || exmode_active)
 #endif
 		&& !global_busy)
 	    got_int = FALSE;