Merge everything into the one global map.

This commit is contained in:
w0rp
2016-10-24 20:21:32 +01:00
parent 0dbf08f6d5
commit c546f47cc0
13 changed files with 122 additions and 77 deletions

View File

@@ -1,9 +1,7 @@
Before:
let g:ale_buffer_loclist_map = {}
let g:ale_statusline_format = ['%sE', '%sW', 'OKIE']
After:
let g:ale_buffer_loclist_map = {}
let g:ale_buffer_info = {}
Execute (Count should be 0 when data is empty):
@@ -20,19 +18,22 @@ Execute (The count should be correct after an update):
AssertEqual [0, 0], ale#statusline#Count(44)
Execute (Count should be match the loclist):
let g:ale_buffer_info = {bufnr('%'): {}}
let g:ale_buffer_loclist_map = {bufnr('%'): [
\ {
\ 'lnum': 1,
\ 'bufnr': 1,
\ 'vcol': 0,
\ 'linter_name': 'testlinter',
\ 'nr': -1,
\ 'type': 'E',
\ 'col': 1,
\ 'text': 'Test Error',
\ },
\]}
let g:ale_buffer_info = {
\ bufnr('%'): {
\ 'loclist': [
\ {
\ 'lnum': 1,
\ 'bufnr': 1,
\ 'vcol': 0,
\ 'linter_name': 'testlinter',
\ 'nr': -1,
\ 'type': 'E',
\ 'col': 1,
\ 'text': 'Test Error',
\ },
\ ],
\ },
\}
AssertEqual [1, 0], ale#statusline#Count(bufnr('%'))
Execute (Output should be empty for non-existant buffer):