e149692cc9
subrepo: subdir: "dotfiles/.vim/plugged/ale" merged: "e4b205440" upstream: origin: "https://github.com/dense-analysis/ale.git" branch: "master" commit: "e4b205440" git-subrepo: version: "0.4.3" origin: "???" commit: "???"
30 lines
828 B
Text
30 lines
828 B
Text
Before:
|
|
Save g:ale_buffer_info
|
|
|
|
call ale#linter#Reset()
|
|
|
|
After:
|
|
Restore
|
|
|
|
call setloclist(0, [])
|
|
call clearmatches()
|
|
call ale#sign#Clear()
|
|
|
|
Given foobar (Some file):
|
|
abc
|
|
|
|
Execute(The loclist shouldn't be cleared when opening the loclist):
|
|
call ale#engine#InitBufferInfo(bufnr(''))
|
|
let g:ale_buffer_info[bufnr('')].loclist = [
|
|
\ {'bufnr': bufnr('%'), 'type': 'E', 'lnum': 3, 'col': 2},
|
|
\]
|
|
call setloclist(0, g:ale_buffer_info[bufnr('')].loclist)
|
|
|
|
" The cleanup function is called when the loclist window is closed.
|
|
" If some cleanup is done for this buffer, for which nothing is wrong,
|
|
" then the loclist for the window, which is the same window as the window
|
|
" we are checking, will be cleared.
|
|
:lopen
|
|
:q
|
|
|
|
AssertEqual 1, len(ale#test#GetLoclistWithoutNewerKeys()), 'The loclist was cleared'
|