Merge pull request #30380 from zeertzjq/backport

Manual backport of #30377 to release-0.10
This commit is contained in:
zeertzjq
2024-09-14 20:04:10 +08:00
committed by GitHub
2 changed files with 18 additions and 1 deletions

View File

@ -6936,6 +6936,11 @@ bool set_ref_in_quickfix(int copyID)
if (abort) {
return abort;
}
abort = mark_quickfix_user_data(win->w_llist_ref, copyID);
if (abort) {
return abort;
}
}
}

View File

@ -4072,11 +4072,23 @@ func Test_ll_window_ctx()
enew | only
endfunc
" Similar to the problem above, but for user data.
func Test_ll_window_user_data()
call setloclist(0, [#{bufnr: bufnr(), user_data: {}}])
lopen
wincmd t
close
call test_garbagecollect_now()
call feedkeys("\<CR>", 'tx')
call test_garbagecollect_now()
%bwipe!
endfunc
" The following test used to crash vim
func Test_lfile_crash()
sp Xtest
au QuickFixCmdPre * bw
call assert_fails('lfile', 'E40')
call assert_fails('lfile', 'E40:')
au! QuickFixCmdPre
endfunc