diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-04-03 12:59:34 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-04-03 12:59:34 +0100 |
commit | ce416b453a849c837f9f6ffc91dd4792d84e1bfd (patch) | |
tree | ac34f041b3743c1f5bf07af7784269894b71b43b /src/ex_cmds.c | |
parent | a3157a476bfa8c3077d510cc8400093c0d115df5 (diff) |
patch 8.2.4672: using :normal with Ex mode may make :substitute hangv8.2.4672
Problem: Using :normal with Ex mode may make :substitute hang.
Solution: When getting an empty line behave like 'q' was typed.
(closes #10070)
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 25f06e623c..8cdac4b74e 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -4233,6 +4233,11 @@ ex_substitute(exarg_T *eap) { 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 |