mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-10 21:42:31 +08:00
Remove error highlights when buffers are cleaned up
This commit is contained in:
@@ -74,3 +74,20 @@ Execute(Existing highlights should be kept):
|
||||
\ {'group': 'ALEWarning', 'id': 8, 'priority': 10, 'pos1': [4, 1, 1]},
|
||||
\ ],
|
||||
\ getmatches()
|
||||
|
||||
" This test is important for preventing ALE from showing highlights for
|
||||
" the wrong files.
|
||||
Execute(Highlights set by ALE should be removed when buffer cleanup is done):
|
||||
call ale#engine#InitBufferInfo(bufnr('%'))
|
||||
|
||||
call ale#highlight#SetHighlights(bufnr('%'), [
|
||||
\ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 3, 'col': 2},
|
||||
\])
|
||||
|
||||
AssertEqual
|
||||
\ [{'group': 'ALEError', 'id': 9, 'priority': 10, 'pos1': [3, 2, 1]}],
|
||||
\ getmatches()
|
||||
|
||||
call ale#cleanup#Buffer(bufnr('%'))
|
||||
|
||||
AssertEqual [], getmatches()
|
||||
|
||||
Reference in New Issue
Block a user