Mercurial > vim
comparison src/testdir/test_quickfix.vim @ 30942:f55ddd3748f5 v9.0.0805
patch 9.0.0805: filetype autocmd may cause freed memory access
Commit: https://github.com/vim/vim/commit/d0fab10ed2a86698937e3c3fed2f10bd9bb5e731
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Oct 20 16:03:33 2022 +0100
patch 9.0.0805: filetype autocmd may cause freed memory access
Problem: Filetype autocmd may cause freed memory access.
Solution: Set the quickfix-busy flag while filling the buffer.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 20 Oct 2022 17:15:04 +0200 |
parents | bba8d0f45cb8 |
children | a7dba627a21b |
comparison
equal
deleted
inserted
replaced
30941:0fe7fc26ec1e | 30942:f55ddd3748f5 |
---|---|
3453 augroup END | 3453 augroup END |
3454 augroup! QF_Test | 3454 augroup! QF_Test |
3455 endtry | 3455 endtry |
3456 endfunc | 3456 endfunc |
3457 | 3457 |
3458 func Test_filetype_autocmd() | |
3459 " this changes the location list while it is in use to fill a buffer | |
3460 lexpr '' | |
3461 lopen | |
3462 augroup FT_loclist | |
3463 au FileType * call setloclist(0, [], 'f') | |
3464 augroup END | |
3465 silent! lolder | |
3466 lexpr '' | |
3467 | |
3468 augroup FT_loclist | |
3469 au! FileType | |
3470 augroup END | |
3471 endfunc | |
3472 | |
3458 func Test_vimgrep_with_textlock() | 3473 func Test_vimgrep_with_textlock() |
3459 new | 3474 new |
3460 | 3475 |
3461 " Simple way to execute something with "textlock" set. | 3476 " Simple way to execute something with "textlock" set. |
3462 " Check that vimgrep without jumping can be executed. | 3477 " Check that vimgrep without jumping can be executed. |
6370 \ ' 2: 20 | Afunc():', ' 3: ', ' 4: | ^'], l) | 6385 \ ' 2: 20 | Afunc():', ' 3: ', ' 4: | ^'], l) |
6371 | 6386 |
6372 call setqflist([], 'f') | 6387 call setqflist([], 'f') |
6373 endfunc | 6388 endfunc |
6374 | 6389 |
6390 | |
6375 " vim: shiftwidth=2 sts=2 expandtab | 6391 " vim: shiftwidth=2 sts=2 expandtab |