From 026c4f304ee69b81c80f9969c62353546c847c7a Mon Sep 17 00:00:00 2001 From: w0rp Date: Sat, 24 Jun 2017 12:35:01 +0100 Subject: #681 Show extra kotlin errors at line 1 --- ale_linters/kotlin/kotlinc.vim | 2 +- autoload/ale/engine.vim | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ale_linters/kotlin/kotlinc.vim b/ale_linters/kotlin/kotlinc.vim index 8d66b371..525202cf 100644 --- a/ale_linters/kotlin/kotlinc.vim +++ b/ale_linters/kotlin/kotlinc.vim @@ -136,7 +136,7 @@ function! ale_linters#kotlin#kotlinc#Handle(buffer, lines) abort let l:type_marker_str = l:type ==# 'warning' || l:type ==# 'info' ? 'W' : 'E' call add(l:output, { - \ 'lnum': -1, + \ 'lnum': 1, \ 'text': l:text, \ 'type': l:type_marker_str, \}) diff --git a/autoload/ale/engine.vim b/autoload/ale/engine.vim index 0cccd2f1..f7c25b04 100644 --- a/autoload/ale/engine.vim +++ b/autoload/ale/engine.vim @@ -328,8 +328,8 @@ function! ale#engine#FixLocList(buffer, linter_name, loclist) abort let l:item.sub_type = l:old_item.sub_type endif - if l:item.lnum == 0 - " When errors appear at line 0, put them at line 1 instead. + if l:item.lnum < 1 + " When errors appear before line 1, put them at line 1. let l:item.lnum = 1 elseif l:item.lnum > l:last_line_number " When errors go beyond the end of the file, put them at the end. -- cgit v1.2.3