mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
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)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user