From ca120088c7206dfe8fc0a9e88a22470123cc574d Mon Sep 17 00:00:00 2001 From: w0rp Date: Sun, 7 May 2017 19:30:19 +0100 Subject: Fix #539 - Just set our highlights again when buffers are shown after being hidden --- test/test_highlight_placement.vader | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/test_highlight_placement.vader b/test/test_highlight_placement.vader index e67bca01..25c98784 100644 --- a/test/test_highlight_placement.vader +++ b/test/test_highlight_placement.vader @@ -96,9 +96,13 @@ Execute(Highlights set by ALE should be removed when buffer cleanup is done): Execute(Highlights should be cleared when buffers are hidden): call ale#engine#InitBufferInfo(bufnr('%')) - call ale#highlight#SetHighlights(bufnr('%'), [ + let g:ale_buffer_info[bufnr('%')].loclist = [ \ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 3, 'col': 2}, - \]) + \] + call ale#highlight#SetHighlights( + \ bufnr('%'), + \ g:ale_buffer_info[bufnr('%')].loclist + \) AssertEqual 1, len(getmatches()), 'The highlights weren''t initially set!' @@ -112,9 +116,13 @@ Execute(Highlights should be cleared when buffers are hidden): Execute(Only ALE highlights should be restored when buffers are restored): call ale#engine#InitBufferInfo(bufnr('%')) - call ale#highlight#SetHighlights(bufnr('%'), [ + let g:ale_buffer_info[bufnr('%')].loclist = [ \ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 3, 'col': 2}, - \]) + \] + call ale#highlight#SetHighlights( + \ bufnr('%'), + \ g:ale_buffer_info[bufnr('%')].loclist + \) call matchaddpos('SomeOtherGroup', [[1, 1, 1]]) -- cgit v1.2.3