Fix #604 - Support highlights spanning many lines

This commit is contained in:
w0rp
2017-05-31 13:14:39 +01:00
parent 676a4049b3
commit ab50b3a88a
5 changed files with 100 additions and 27 deletions

View File

@@ -129,7 +129,7 @@ Execute(FixLocList should convert line and column numbers correctly):
\ [{'text': 'a', 'lnum': '010', 'col': '010'}],
\ )
Execute(FixLocList should pass on col_length values):
Execute(FixLocList should pass on end_col values):
" The numbers should be 10, not 8 as octals.
AssertEqual
\ [
@@ -165,6 +165,44 @@ Execute(FixLocList should pass on col_length values):
\ ],
\ )
Execute(FixLocList should pass on end_lnum values):
AssertEqual
\ [
\ {
\ 'text': 'a',
\ 'lnum': 10,
\ 'col': 10,
\ 'end_lnum': 13,
\ 'end_col': 12,
\ 'bufnr': bufnr('%'),
\ 'vcol': 0,
\ 'type': 'E',
\ 'nr': -1,
\ 'linter_name': 'foobar',
\ },
\ {
\ 'text': 'a',
\ 'lnum': 10,
\ 'col': 11,
\ 'end_lnum': 13,
\ 'end_col': 12,
\ 'bufnr': bufnr('%'),
\ 'vcol': 0,
\ 'type': 'E',
\ 'nr': -1,
\ 'linter_name': 'foobar',
\ },
\],
\ ale#engine#FixLocList(
\ bufnr('%'),
\ {'name': 'foobar'},
\ [
\ {'text': 'a', 'lnum': '010', 'col': '010', 'end_col': '012', 'end_lnum': '013'},
\ {'text': 'a', 'lnum': '010', 'col': '011', 'end_col': 12, 'end_lnum': 13},
\ ],
\ )
Execute(FixLocList should allow subtypes to be set):
AssertEqual
\ [