summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorJon Gjengset <jon@thesquareplanet.com>2017-05-31 08:17:04 -0400
committerw0rp <w0rp@users.noreply.github.com>2017-05-31 13:17:04 +0100
commit5eb80f03a2d0831a1fc3b06790f634d7f2b09658 (patch)
tree7278e43b1cf7c4d0a64f26c266796d24c0fad4c9 /autoload
parentab50b3a88a741ac86315ae3e716815c6725b159b (diff)
downloadale-5eb80f03a2d0831a1fc3b06790f634d7f2b09658.zip
Include location list end column for rust lint (#602)
* Include location list end column for rust lint Fixes #599. * Include rust lint end_lnum for good measure * Reverse engineer end_* for rust lint tests
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/handlers/rust.vim8
1 files changed, 6 insertions, 2 deletions
diff --git a/autoload/ale/handlers/rust.vim b/autoload/ale/handlers/rust.vim
index 1f5296a1..5781e619 100644
--- a/autoload/ale/handlers/rust.vim
+++ b/autoload/ale/handlers/rust.vim
@@ -10,7 +10,7 @@ endif
" returns: a list [lnum, col] with the location of the error or []
function! s:FindErrorInExpansion(span, file_name) abort
if a:span.file_name ==# a:file_name
- return [a:span.line_start, a:span.byte_start]
+ return [a:span.line_start, a:span.line_end, a:span.byte_start, a:span.byte_end]
endif
if !empty(a:span.expansion)
@@ -52,7 +52,9 @@ function! ale#handlers#rust#HandleRustErrorsForFile(buffer, full_filename, lines
\)
call add(l:output, {
\ 'lnum': l:span.line_start,
+ \ 'end_lnum': l:span.line_end,
\ 'col': l:span.byte_start,
+ \ 'end_col': l:span.byte_end,
\ 'text': l:error.message,
\ 'type': toupper(l:error.level[0]),
\})
@@ -64,7 +66,9 @@ function! ale#handlers#rust#HandleRustErrorsForFile(buffer, full_filename, lines
if !empty(l:root_cause)
call add(l:output, {
\ 'lnum': l:root_cause[0],
- \ 'col': l:root_cause[1],
+ \ 'end_lnum': l:root_cause[1],
+ \ 'col': l:root_cause[2],
+ \ 'end_col': l:root_cause[3],
\ 'text': l:error.message,
\ 'type': toupper(l:error.level[0]),
\})