Correct issues with some errors appearing at line 0, not 1.
This commit is contained in:
parent
9902eadd33
commit
8d390384f1
@ -100,7 +100,10 @@ function! s:FixLoclist(buffer, loclist)
|
|||||||
let last_line_number = ale#util#GetLineCount(a:buffer)
|
let last_line_number = ale#util#GetLineCount(a:buffer)
|
||||||
|
|
||||||
for item in a:loclist
|
for item in a:loclist
|
||||||
if item.lnum > last_line_number
|
if item.lnum == 0
|
||||||
|
" When errors appear at line 0, put them at line 1 instead.
|
||||||
|
let item.lnum = 1
|
||||||
|
elseif item.lnum > last_line_number
|
||||||
let item.lnum = last_line_number
|
let item.lnum = last_line_number
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
|
Loading…
Reference in New Issue
Block a user