summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-06-24 12:35:01 +0100
committerw0rp <devw0rp@gmail.com>2017-06-24 12:35:01 +0100
commit026c4f304ee69b81c80f9969c62353546c847c7a (patch)
tree0dce0fe31885a48808a9e98ef811b21b09dc67a1
parent1ea61162a0c43da9a149b24dc35911cb981fbe7c (diff)
downloadale-026c4f304ee69b81c80f9969c62353546c847c7a.zip
#681 Show extra kotlin errors at line 1
-rw-r--r--ale_linters/kotlin/kotlinc.vim2
-rw-r--r--autoload/ale/engine.vim4
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.