From d6d6fcf928b8928fe0461e87cee354baf5b2d66a Mon Sep 17 00:00:00 2001 From: Andrey Popp <8mayday@gmail.com> Date: Sat, 19 Jan 2019 18:50:21 +0300 Subject: [PATCH] End position in LSP range is exclusive From LSP spec: > A range in a text document expressed as (zero-based) start and end > positions. A range is comparable to a selection in an editor. Therefore > the end position is exclusive. --- autoload/ale/lsp/response.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/ale/lsp/response.vim b/autoload/ale/lsp/response.vim index 08b36808..5e62a29a 100644 --- a/autoload/ale/lsp/response.vim +++ b/autoload/ale/lsp/response.vim @@ -33,7 +33,7 @@ function! ale#lsp#response#ReadDiagnostics(response) abort \ 'lnum': l:diagnostic.range.start.line + 1, \ 'col': l:diagnostic.range.start.character + 1, \ 'end_lnum': l:diagnostic.range.end.line + 1, - \ 'end_col': l:diagnostic.range.end.character + 1, + \ 'end_col': l:diagnostic.range.end.character, \} if l:severity == s:SEVERITY_WARNING