vim-patch:8.2.2465: using freed memory in :psearch

Problem:    Using freed memory in :psearch. (houyunsong)
Solution:   Check the current window is still valid.  Fix flaky test.
92bb83e41c

Test_cursorhold_insert timer's 100ms delay was already LoadAdjusted, but change
to 200ms (still LoadAdjust) to match Vim anyway.
This commit is contained in:
Sean Dewar
2021-11-24 03:58:44 +00:00
parent c366c944c2
commit dac52e6d04
2 changed files with 28 additions and 3 deletions

View File

@@ -5248,6 +5248,9 @@ search_line:
if (depth == -1) {
// match in current file
if (l_g_do_tagpreview != 0) {
if (!win_valid(curwin_save)) {
break;
}
if (!GETFILE_SUCCESS(getfile(curwin_save->w_buffer->b_fnum, NULL,
NULL, true, lnum, false))) {
break; // failed to jump to file