mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-10 05:22:31 +08:00
Fix #272 by checking if quickfix is open before reopening to avoid triggering a BufEnter event that causes quickly repeating linting runs when g:ale_lint_on_enter = 1.
Add test assertions that quickfix window closes when lists become empty again.
This commit is contained in:
@@ -49,6 +49,10 @@ Execute(The quickfix window should open for just the loclist):
|
||||
call ale#list#SetLists(bufnr('%'), g:loclist)
|
||||
Assert ale#list#IsQuickfixOpen()
|
||||
|
||||
" Clear the list and it should close again.
|
||||
call ale#list#SetLists(bufnr('%'), [])
|
||||
Assert !ale#list#IsQuickfixOpen()
|
||||
|
||||
Execute(The quickfix window should stay open for just the loclist):
|
||||
let g:ale_open_list = 1
|
||||
let g:ale_keep_list_window_open = 1
|
||||
@@ -76,6 +80,10 @@ Execute(The quickfix window should open for the quickfix list):
|
||||
call ale#list#SetLists(bufnr('%'), g:loclist)
|
||||
Assert ale#list#IsQuickfixOpen()
|
||||
|
||||
" Clear the list and it should close again.
|
||||
call ale#list#SetLists(bufnr('%'), [])
|
||||
Assert !ale#list#IsQuickfixOpen()
|
||||
|
||||
Execute(The quickfix window should stay open for the quickfix list):
|
||||
let g:ale_set_quickfix = 1
|
||||
let g:ale_open_list = 1
|
||||
|
||||
Reference in New Issue
Block a user