Correct issues with some errors appearing at line 0, not 1.

This commit is contained in:
w0rp 2016-10-09 21:40:33 +01:00
parent 9902eadd33
commit 8d390384f1

View File

@ -100,7 +100,10 @@ function! s:FixLoclist(buffer, loclist)
let last_line_number = ale#util#GetLineCount(a:buffer)
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
endif
endfor