mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-06 20:54:26 +08:00
#1621 - Tolerate SetOptions calls when ALE is loaded in a weird way
This commit is contained in:
@@ -90,3 +90,14 @@ Execute(Patterns should be applied after the Dictionary changes):
|
||||
call ale#pattern_options#SetOptions(bufnr(''))
|
||||
|
||||
AssertEqual 666, b:some_option
|
||||
|
||||
Execute(SetOptions should tolerate settings being unset):
|
||||
" This might happen if ALE is loaded in a weird way, so tolerate it.
|
||||
unlet! g:ale_pattern_options
|
||||
unlet! g:ale_pattern_options_enabled
|
||||
|
||||
call ale#pattern_options#SetOptions(bufnr(''))
|
||||
|
||||
let g:ale_pattern_options_enabled = 1
|
||||
|
||||
call ale#pattern_options#SetOptions(bufnr(''))
|
||||
|
||||
Reference in New Issue
Block a user