summaryrefslogtreecommitdiff
path: root/test/test_highlight_placement.vader
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-05-07 19:30:19 +0100
committerw0rp <devw0rp@gmail.com>2017-05-07 19:30:19 +0100
commitca120088c7206dfe8fc0a9e88a22470123cc574d (patch)
tree73293333caa34d6bd4e2875e06f02a141c611aaf /test/test_highlight_placement.vader
parentf6723784e6e0e00b82100251f6a508d262d3b86c (diff)
downloadale-ca120088c7206dfe8fc0a9e88a22470123cc574d.zip
Fix #539 - Just set our highlights again when buffers are shown after being hidden
Diffstat (limited to 'test/test_highlight_placement.vader')
-rw-r--r--test/test_highlight_placement.vader16
1 files changed, 12 insertions, 4 deletions
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]])