You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
626 B
Plaintext
27 lines
626 B
Plaintext
Before:
|
|
Save g:ale_buffer_info
|
|
|
|
let g:ale_buffer_info = {
|
|
\ bufnr(''): {
|
|
\ 'loclist': [{'bufnr': bufnr(''), 'lnum': 4, 'col': 1, 'text': 'foo'}]
|
|
\ },
|
|
\}
|
|
|
|
let g:original_buffer = bufnr('%')
|
|
noautocmd new
|
|
|
|
After:
|
|
Restore
|
|
|
|
unlet! g:original_buffer
|
|
|
|
Execute(Errors should be set in the loclist for the original buffer, not the new one):
|
|
call ale#list#SetLists(
|
|
\ g:original_buffer,
|
|
\ g:ale_buffer_info[(g:original_buffer)].loclist,
|
|
\ )
|
|
|
|
AssertEqual [], getloclist(0)
|
|
AssertEqual 1, len(getloclist(bufwinid(g:original_buffer)))
|
|
AssertEqual 'foo', getloclist(bufwinid(g:original_buffer))[0].text
|