summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-07-07 23:47:41 +0100
committerw0rp <devw0rp@gmail.com>2017-07-07 23:47:41 +0100
commit8eb4f95766350b7a1f80eae691f390faee045e6d (patch)
tree8d3973d0226c83d129fa8c2292befb5adf601759 /plugin
parent46225f3bb13a242bf3b218d395f3911f013d5f14 (diff)
downloadale-8eb4f95766350b7a1f80eae691f390faee045e6d.zip
#697 - Clear all highlights every time items are set again, and refactor most things. Clear errors when linters are removed
Diffstat (limited to 'plugin')
-rw-r--r--plugin/ale.vim9
1 files changed, 4 insertions, 5 deletions
diff --git a/plugin/ale.vim b/plugin/ale.vim
index 58ab1ece..50735753 100644
--- a/plugin/ale.vim
+++ b/plugin/ale.vim
@@ -293,10 +293,9 @@ function! s:ALEToggle() abort
" Make sure the buffer number is a number, not a string,
" otherwise things can go wrong.
for l:buffer in map(keys(g:ale_buffer_info), 'str2nr(v:val)')
- " Stop jobs and delete stored buffer data
- call ale#cleanup#Buffer(l:buffer)
- " Clear signs, loclist, quicklist
- call ale#engine#SetResults(l:buffer, [])
+ " Stop all jobs and clear the results for everything, and delete
+ " all of the data we stored for the buffer.
+ call ale#engine#Cleanup(l:buffer)
endfor
" Remove highlights for the current buffer now.
@@ -368,7 +367,7 @@ nnoremap <silent> <Plug>(ale_fix) :ALEFix<Return>
augroup ALECleanupGroup
autocmd!
" Clean up buffers automatically when they are unloaded.
- autocmd BufUnload * call ale#cleanup#Buffer(expand('<abuf>'))
+ autocmd BufUnload * call ale#engine#Cleanup(str2nr(expand('<abuf>')))
augroup END
" Backwards Compatibility