comparison src/search.c @ 23847:b0e7fa957cd1 v8.2.2465

patch 8.2.2465: using freed memory in :psearch Commit: https://github.com/vim/vim/commit/92bb83e41ca42d0d00d21753810d92485c808a50 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Feb 3 23:04:46 2021 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Wed, 03 Feb 2021 23:15:04 +0100
parents bb29b09902d5
children 55f458d35292
comparison
equal deleted inserted replaced
23846:3b6bca71ab93 23847:b0e7fa957cd1
3862 { 3862 {
3863 // match in current file 3863 // match in current file
3864 #if defined(FEAT_QUICKFIX) 3864 #if defined(FEAT_QUICKFIX)
3865 if (g_do_tagpreview != 0) 3865 if (g_do_tagpreview != 0)
3866 { 3866 {
3867 if (!win_valid(curwin_save))
3868 break;
3867 if (!GETFILE_SUCCESS(getfile( 3869 if (!GETFILE_SUCCESS(getfile(
3868 curwin_save->w_buffer->b_fnum, NULL, 3870 curwin_save->w_buffer->b_fnum, NULL,
3869 NULL, TRUE, lnum, FALSE))) 3871 NULL, TRUE, lnum, FALSE)))
3870 break; // failed to jump to file 3872 break; // failed to jump to file
3871 } 3873 }