#538 Suport highlight sizes by looking at end column numbers

This commit is contained in:
w0rp
2017-05-16 18:12:49 +01:00
parent 8712aee5dc
commit a65358cfce
4 changed files with 55 additions and 1 deletions

View File

@@ -128,3 +128,39 @@ Execute(FixLocList should convert line and column numbers correctly):
\ {'name': 'foobar'},
\ [{'text': 'a', 'lnum': '010', 'col': '010'}],
\ )
Execute(FixLocList should pass on col_length values):
" The numbers should be 10, not 8 as octals.
AssertEqual
\ [
\ {
\ 'text': 'a',
\ 'lnum': 10,
\ 'col': 10,
\ 'end_col': 12,
\ 'bufnr': bufnr('%'),
\ 'vcol': 0,
\ 'type': 'E',
\ 'nr': -1,
\ 'linter_name': 'foobar',
\ },
\ {
\ 'text': 'a',
\ 'lnum': 10,
\ 'col': 11,
\ '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'},
\ {'text': 'a', 'lnum': '010', 'col': '011', 'end_col': 12},
\ ],
\ )