summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-06-02 19:02:48 +0100
committerw0rp <devw0rp@gmail.com>2017-06-02 19:02:54 +0100
commit7c68889bbcf04091ea19bd4d3d18d5f800d24c30 (patch)
tree53b816ee380ff56ffc00fa1954737f9b0f97cb67 /autoload
parent955452816a4e44efabfb6181112221e2d7efb11e (diff)
downloadale-7c68889bbcf04091ea19bd4d3d18d5f800d24c30.zip
#574 Do not restore items with no columns for highlights from hidden buffers
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/highlight.vim6
1 files changed, 5 insertions, 1 deletions
diff --git a/autoload/ale/highlight.vim b/autoload/ale/highlight.vim
index d63e7166..80e43526 100644
--- a/autoload/ale/highlight.vim
+++ b/autoload/ale/highlight.vim
@@ -164,7 +164,11 @@ function! ale#highlight#BufferHidden(buffer) abort
endif
endfor
- let s:buffer_restore_map[a:buffer] = l:loclist
+ let s:buffer_restore_map[a:buffer] = filter(
+ \ copy(l:loclist),
+ \ 'v:val.bufnr == a:buffer && v:val.col > 0'
+ \)
+
call clearmatches()
endif
endfunction