summaryrefslogtreecommitdiff
path: root/autoload/ale/cleanup.vim
blob: 45eccb98d202947929e7b179a5bca33f83723e52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
" Author: w0rp <devw0rp@gmail.com>
" Description: Utility functions related to cleaning state.

function! ale#cleanup#Buffer(buffer) abort
    if has_key(g:ale_buffer_count_map, a:buffer)
        call remove(g:ale_buffer_count_map, a:buffer)
    endif

    if has_key(g:ale_buffer_loclist_map, a:buffer)
        call remove(g:ale_buffer_loclist_map, a:buffer)
    endif

    if has_key(g:ale_buffer_should_reset_map, a:buffer)
        call remove(g:ale_buffer_should_reset_map, a:buffer)
    endif

    if has_key(g:ale_buffer_sign_dummy_map, a:buffer)
        call remove(g:ale_buffer_sign_dummy_map, a:buffer)
    endif
endfunction