1
0
forked from aniani/vim

patch 7.4.1592

Problem:    Quickfix code using memory after being freed. (Dominique Pelle)
Solution:   Detect that the window was closed. (Hirohito Higashi)
This commit is contained in:
Bram Moolenaar
2016-03-19 13:35:03 +01:00
parent 5584df65a0
commit 0899d69803
3 changed files with 38 additions and 3 deletions

View File

@@ -495,3 +495,22 @@ function Test_locationlist()
augroup! testgroup
endfunction
function Test_locationlist_curwin_was_closed()
augroup testgroup
au!
autocmd BufReadCmd t call R(expand("<amatch>"))
augroup END
function R(n)
quit
endfunc
new
let q = []
call add(q, {'filename': 't' })
call setloclist(0, q)
call assert_fails('lrewind', 'E924:')
augroup! testgroup
endfunction