vim-patch:8.1.0273: invalid memory access when using 'incsearch'

Problem:    Invalid memory access when using 'incsearch'.
Solution:   Reset "patlen" when using previous search pattern.
ef73a28401
This commit is contained in:
Aufar Gilbran 2020-08-12 03:08:05 +08:00
parent e8a8b9ed08
commit 5eb7133021

View File

@ -1348,6 +1348,8 @@ static int may_do_command_line_next_incsearch(int firstc, long count,
if (firstc == ccline.cmdbuff[skiplen]) {
pat = last_search_pattern();
skiplen = 0;
patlen = (int)STRLEN(pat);
} else {
pat = ccline.cmdbuff + skiplen;
}