Close #1494 - Prefer displaying higher severity problems for cursor messages, balloons, and highlights

This commit is contained in:
w0rp
2018-04-10 21:05:22 +01:00
parent 3f0e1cd05d
commit f064ba48f5
8 changed files with 156 additions and 68 deletions

View File

@@ -25,3 +25,19 @@ Execute(loclist item should be sorted):
\ {'bufnr': 2, 'lnum': 1, 'col': 2},
\ {'bufnr': -1, 'filename': 'c', 'lnum': 3, 'col': 2},
\], 'ale#util#LocItemCompare')
Execute(Items should be sorted in by their problem priority when they lie on the same column):
AssertEqual [
\ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'W', 'sub_type': 'style'},
\ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'E', 'sub_type': 'style'},
\ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'I'},
\ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'W'},
\ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'E'},
\ ],
\ sort([
\ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'E'},
\ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'I'},
\ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'W'},
\ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'E', 'sub_type': 'style'},
\ {'bufnr': 1, 'lnum': 1, 'col': 1, 'type': 'W', 'sub_type': 'style'},
\], 'ale#util#LocItemCompare')