diff options
author | Lucas Kolstad <lkolstad@uw.edu> | 2017-03-23 15:03:01 -0700 |
---|---|---|
committer | Lucas Kolstad <lkolstad@uw.edu> | 2017-03-24 10:39:37 -0700 |
commit | b3f6f56745f5d288bcf64c8e284ef314ec3e9e30 (patch) | |
tree | 413453f240d753f8a80591d4acf2cfb8dafa9aa6 /test/test_list_opening.vader | |
parent | a5ac3e4e4b66360f4309c77e03d63fa580658a12 (diff) | |
download | ale-b3f6f56745f5d288bcf64c8e284ef314ec3e9e30.zip |
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.
Diffstat (limited to 'test/test_list_opening.vader')
-rw-r--r-- | test/test_list_opening.vader | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_list_opening.vader b/test/test_list_opening.vader index 942f592f..6d0164fd 100644 --- a/test/test_list_opening.vader +++ b/test/test_list_opening.vader @@ -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 |