From 8d390384f1bb279c601663e911f232cc32591f44 Mon Sep 17 00:00:00 2001 From: w0rp Date: Sun, 9 Oct 2016 21:40:33 +0100 Subject: Correct issues with some errors appearing at line 0, not 1. --- plugin/ale/zmain.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugin') diff --git a/plugin/ale/zmain.vim b/plugin/ale/zmain.vim index 20ab0043..b6ffdda3 100644 --- a/plugin/ale/zmain.vim +++ b/plugin/ale/zmain.vim @@ -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 -- cgit v1.2.3