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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user