Fix #534 - Stop other higlights being restored when buffers are hidden and shown again

This commit is contained in:
w0rp
2017-05-06 16:20:39 +01:00
parent 0ac82f0a17
commit bf8aae02e8
2 changed files with 26 additions and 1 deletions

View File

@@ -97,7 +97,10 @@ endfunction
function! ale#highlight#BufferHidden(buffer) abort
" Remember all matches, so they can be restored later.
let s:buffer_restore_map[a:buffer] = getmatches()
let s:buffer_restore_map[a:buffer] = filter(
\ getmatches(),
\ 'get(v:val, ''group'', '''')[:2] ==# ''ALE'''
\)
call clearmatches()
endfunction