summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-04-03 19:04:02 +0100
committerw0rp <devw0rp@gmail.com>2017-04-03 19:04:02 +0100
commitb7c79974bbbb3bf4261fe5ea10f629e44c8534eb (patch)
tree3b7ac36e0acf46deb90bbd5cc010ac938e83c51e /plugin
parent927ee79026cffd50d888aa1edbe277d98d262a43 (diff)
downloadale-b7c79974bbbb3bf4261fe5ea10f629e44c8534eb.zip
#446 Fix g:ale_lint_on_text_changed compatibility issues
Diffstat (limited to 'plugin')
-rw-r--r--plugin/ale.vim9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugin/ale.vim b/plugin/ale.vim
index 6c044e8f..b6f6f296 100644
--- a/plugin/ale.vim
+++ b/plugin/ale.vim
@@ -155,14 +155,17 @@ let g:ale_history_enabled = get(g:, 'ale_history_enabled', 1)
let g:ale_history_log_output = get(g:, 'ale_history_log_output', 0)
function! ALEInitAuGroups() abort
+ " This value used to be a Boolean as a Number, and is now a String.
+ let l:text_changed = '' . g:ale_lint_on_text_changed
+
augroup ALERunOnTextChangedGroup
autocmd!
if g:ale_enabled
- if g:ale_lint_on_text_changed ==? 'always' || g:ale_lint_on_text_changed == 1
+ if l:text_changed ==? 'always' || l:text_changed ==# '1'
autocmd TextChanged,TextChangedI * call ale#Queue(g:ale_lint_delay)
- elseif g:ale_lint_on_text_changed ==? 'normal'
+ elseif l:text_changed ==? 'normal'
autocmd TextChanged * call ale#Queue(g:ale_lint_delay)
- elseif g:ale_lint_on_text_changed ==? 'insert'
+ elseif l:text_changed ==? 'insert'
autocmd TextChangedI * call ale#Queue(g:ale_lint_delay)
endif
endif