diff options
author | Stefan Braun <stbraun@users.noreply.github.com> | 2021-06-22 15:07:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-22 14:07:49 +0100 |
commit | a4ba421803d030a8967ede111ce921d439aa5fbb (patch) | |
tree | 70d37f3d37567c4b572de6a03a57b733e3dc4156 /ale_linters | |
parent | 397d56f40c9ae606edd70c498efef015753963c6 (diff) | |
download | ale-a4ba421803d030a8967ede111ce921d439aa5fbb.zip |
Fixes an index error with Java files. (#3706)
Co-authored-by: w0rp <w0rp@users.noreply.github.com>
Diffstat (limited to 'ale_linters')
-rw-r--r-- | ale_linters/java/javac.vim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ale_linters/java/javac.vim b/ale_linters/java/javac.vim index 760f234c..971e8de0 100644 --- a/ale_linters/java/javac.vim +++ b/ale_linters/java/javac.vim @@ -132,7 +132,9 @@ function! ale_linters#java#javac#Handle(buffer, lines) abort for l:match in ale#util#GetMatches(a:lines, [l:pattern, l:col_pattern, l:symbol_pattern]) if empty(l:match[2]) && empty(l:match[3]) - let l:output[-1].col = len(l:match[1]) + if !empty(l:match[1]) && !empty(l:output) + let l:output[-1].col = len(l:match[1]) + endif elseif empty(l:match[3]) " Add symbols to 'cannot find symbol' errors. if l:output[-1].text is# 'error: cannot find symbol' |