diff options
author | w0rp <devw0rp@gmail.com> | 2017-09-03 18:24:43 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-09-03 18:29:15 +0100 |
commit | 6d500749843ba8470a3eddc4e9846b51ae5bbe4f (patch) | |
tree | 69e815a45e14552971babe867a6110dabfeef114 | |
parent | 6b87dd24ee284c3739ff2aff5c926a79716d5b9a (diff) | |
download | ale-6d500749843ba8470a3eddc4e9846b51ae5bbe4f.zip |
Fix #891 - Do not check ctrlp-funky windows
-rw-r--r-- | autoload/ale.vim | 1 | ||||
-rw-r--r-- | test/test_should_do_nothing_conditions.vader | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/autoload/ale.vim b/autoload/ale.vim index 9defbd82..6941a9a5 100644 --- a/autoload/ale.vim +++ b/autoload/ale.vim @@ -48,6 +48,7 @@ function! ale#ShouldDoNothing(buffer) abort \ || ale#util#InSandbox() \ || !ale#Var(a:buffer, 'enabled') \ || ale#FileTooLarge() + \ || getbufvar(a:buffer, '&l:statusline') =~# 'CtrlPMode.*funky' endfunction " (delay, [linting_flag, buffer_number]) diff --git a/test/test_should_do_nothing_conditions.vader b/test/test_should_do_nothing_conditions.vader new file mode 100644 index 00000000..4d6facf9 --- /dev/null +++ b/test/test_should_do_nothing_conditions.vader @@ -0,0 +1,12 @@ +Before: + Save &l:statusline + +After: + Restore + +Execute(ALE shouldn't do much of anything for ctrlp-funky buffers): + Assert !ale#ShouldDoNothing(bufnr('')), 'The preliminary check failed' + + let &l:statusline = '%#CtrlPMode2# prt %*%#CtrlPMode1# line %* <mru>={%#CtrlPMode1# funky %*}=<fil> <-> %=%<%#CtrlPMode2# %{getcwd()} %*' + + Assert ale#ShouldDoNothing(bufnr('')) |