From 6053f764bd6f7707af0be0f0520a691571de5705 Mon Sep 17 00:00:00 2001 From: w0rp Date: Fri, 1 Dec 2017 17:12:16 +0000 Subject: [PATCH] Make toggling work when pattern options are enabled --- autoload/ale/toggle.vim | 2 +- test/test_ale_toggle.vader | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/autoload/ale/toggle.vim b/autoload/ale/toggle.vim index dcca7038..e9cc29b6 100644 --- a/autoload/ale/toggle.vim +++ b/autoload/ale/toggle.vim @@ -79,7 +79,7 @@ endfunction function! s:EnablePreamble() abort " Set pattern options again, if enabled. if g:ale_pattern_options_enabled - call ale#pattern_options#SetOptions() + call ale#pattern_options#SetOptions(bufnr('')) endif " Lint immediately, including running linters against the file. diff --git a/test/test_ale_toggle.vader b/test/test_ale_toggle.vader index a57546fc..d56f8c2b 100644 --- a/test/test_ale_toggle.vader +++ b/test/test_ale_toggle.vader @@ -3,10 +3,14 @@ Before: Save g:ale_set_signs Save g:ale_set_lists_synchronously Save g:ale_run_synchronously + Save g:ale_pattern_options + Save g:ale_pattern_options_enabled let g:ale_set_signs = 1 let g:ale_set_lists_synchronously = 1 let g:ale_run_synchronously = 1 + let g:ale_pattern_options = {} + let g:ale_pattern_options_enabled = 1 unlet! b:ale_enabled