diff options
-rw-r--r-- | ale_linters/kotlin/kotlinc.vim | 2 | ||||
-rw-r--r-- | 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. |