summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-05-06 16:20:39 +0100
committerw0rp <devw0rp@gmail.com>2017-05-06 16:20:39 +0100
commitbf8aae02e8a1a58649c4617008bd38b71b6b602d (patch)
treecb2d2f3e25a5c2b7a74558d48ffc441474110199 /autoload
parent0ac82f0a1798e7a82f83e549f9b60fbdc24287a5 (diff)
downloadale-bf8aae02e8a1a58649c4617008bd38b71b6b602d.zip
Fix #534 - Stop other higlights being restored when buffers are hidden and shown again
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/highlight.vim5
1 files changed, 4 insertions, 1 deletions
diff --git a/autoload/ale/highlight.vim b/autoload/ale/highlight.vim
index 15b77d3d..8f6b54de 100644
--- a/autoload/ale/highlight.vim
+++ b/autoload/ale/highlight.vim
@@ -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