patch 8.2.4672: using :normal with Ex mode may make :substitute hang
Problem: Using :normal with Ex mode may make :substitute hang.
Solution: When getting an empty line behave like 'q' was typed.
(closes #10070)
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 25f06e6..8cdac4b 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -4233,6 +4233,11 @@
{
typed = *resp;
vim_free(resp);
+ // When ":normal" runs out of characters we get
+ // an empty line. Use "q" to get out of the
+ // loop.
+ if (ex_normal_busy && typed == NUL)
+ typed = 'q';
}
}
else