mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
vim-patch:8.2.4672: using :normal with Ex mode may make :substitute hang (#17983)
Problem: Using :normal with Ex mode may make :substitute hang.
Solution: When getting an empty line behave like 'q' was typed.
(closes vim/vim#10070)
ce416b453a
Cherry-pick a comment from patch 8.2.0363.
This commit is contained in:
@@ -3867,6 +3867,12 @@ static buf_T *do_sub(exarg_T *eap, proftime_T timeout, bool do_buf_event, handle
|
||||
if (resp != NULL) {
|
||||
typed = *resp;
|
||||
xfree(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 {
|
||||
char_u *orig_line = NULL;
|
||||
|
Reference in New Issue
Block a user