#376 Use the window ID for a given buffer for setting the loclist
This commit is contained in:
@@ -35,18 +35,18 @@ Execute(IsQuickfixOpen should return the right output):
|
||||
AssertEqual 0, ale#list#IsQuickfixOpen()
|
||||
|
||||
Execute(The quickfix window should not open by default for the loclist):
|
||||
call ale#list#SetLists(g:loclist)
|
||||
call ale#list#SetLists(bufnr('%'), g:loclist)
|
||||
Assert !ale#list#IsQuickfixOpen()
|
||||
|
||||
Execute(The quickfix window should open for just the loclist):
|
||||
let g:ale_open_list = 1
|
||||
|
||||
" It should not open for an empty list.
|
||||
call ale#list#SetLists([])
|
||||
call ale#list#SetLists(bufnr('%'), [])
|
||||
Assert !ale#list#IsQuickfixOpen()
|
||||
|
||||
" With a non-empty loclist, the window must open.
|
||||
call ale#list#SetLists(g:loclist)
|
||||
call ale#list#SetLists(bufnr('%'), g:loclist)
|
||||
Assert ale#list#IsQuickfixOpen()
|
||||
|
||||
Execute(The quickfix window should stay open for just the loclist):
|
||||
@@ -54,14 +54,14 @@ Execute(The quickfix window should stay open for just the loclist):
|
||||
let g:ale_keep_list_window_open = 1
|
||||
|
||||
" The window should stay open after even after it is made blank again.
|
||||
call ale#list#SetLists(g:loclist)
|
||||
call ale#list#SetLists([])
|
||||
call ale#list#SetLists(bufnr('%'), g:loclist)
|
||||
call ale#list#SetLists(bufnr('%'), [])
|
||||
Assert ale#list#IsQuickfixOpen()
|
||||
|
||||
Execute(The quickfix window should not open by default when quickfix is on):
|
||||
let g:ale_set_quickfix = 1
|
||||
|
||||
call ale#list#SetLists(g:loclist)
|
||||
call ale#list#SetLists(bufnr('%'), g:loclist)
|
||||
Assert !ale#list#IsQuickfixOpen()
|
||||
|
||||
Execute(The quickfix window should open for the quickfix list):
|
||||
@@ -69,11 +69,11 @@ Execute(The quickfix window should open for the quickfix list):
|
||||
let g:ale_open_list = 1
|
||||
|
||||
" It should not open for an empty list.
|
||||
call ale#list#SetLists([])
|
||||
call ale#list#SetLists(bufnr('%'), [])
|
||||
Assert !ale#list#IsQuickfixOpen()
|
||||
|
||||
" With a non-empty quickfix list, the window must open.
|
||||
call ale#list#SetLists(g:loclist)
|
||||
call ale#list#SetLists(bufnr('%'), g:loclist)
|
||||
Assert ale#list#IsQuickfixOpen()
|
||||
|
||||
Execute(The quickfix window should stay open for the quickfix list):
|
||||
@@ -82,6 +82,6 @@ Execute(The quickfix window should stay open for the quickfix list):
|
||||
let g:ale_keep_list_window_open = 1
|
||||
|
||||
" The window should stay open after even after it is made blank again.
|
||||
call ale#list#SetLists(g:loclist)
|
||||
call ale#list#SetLists([])
|
||||
call ale#list#SetLists(bufnr('%'), g:loclist)
|
||||
call ale#list#SetLists(bufnr('%'), [])
|
||||
Assert ale#list#IsQuickfixOpen()
|
||||
|
||||
Reference in New Issue
Block a user