vim-patch:8.1.0555: crash when last search pat is set but not last substitute pat

Problem:    Crash when last search pat is set but not last substitute pat.
Solution:   Do not mix up last search pattern and last subtitute pattern.
            (closes vim/vim#3647)
2fb8f684d8
This commit is contained in:
Jan Edmund Lazo
2020-09-12 18:42:48 -04:00
parent c7ef802206
commit d5eff30c72
2 changed files with 13 additions and 1 deletions

View File

@@ -1179,7 +1179,7 @@ int do_search(
}
if (*searchstr == NUL) {
p = spats[last_idx].pat;
p = spats[0].pat;
} else {
p = searchstr;
}