From d0b5909fd8cb96fa65363af44d02eb0038c6112c Mon Sep 17 00:00:00 2001 From: Dalius Dobravolskas Date: Sat, 21 Nov 2020 01:26:16 +0000 Subject: [PATCH] #3442 Fix code fix clangd issue --- autoload/ale/codefix.vim | 2 +- test/test_codefix.vader | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/ale/codefix.vim b/autoload/ale/codefix.vim index 3120e7cb..69bf36fa 100644 --- a/autoload/ale/codefix.vim +++ b/autoload/ale/codefix.vim @@ -379,7 +379,7 @@ function! s:OnReady( \ }, \ 'end': { \ 'line': l:nearest_error.end_lnum - 1, - \ 'character': l:nearest_error.end_col - 1, + \ 'character': l:nearest_error.end_col, \ }, \ }, \ }, diff --git a/test/test_codefix.vader b/test/test_codefix.vader index deb97256..fc5470aa 100644 --- a/test/test_codefix.vader +++ b/test/test_codefix.vader @@ -508,7 +508,7 @@ Execute(LSP code action requests should be sent): \ [ \ [0, 'textDocument/codeAction', { \ 'context': { - \ 'diagnostics': [{'range': {'end': {'character': 5, 'line': 1}, 'start': {'character': 4, 'line': 1}}, 'code': 2304, 'message': 'oops'}] + \ 'diagnostics': [{'range': {'end': {'character': 6, 'line': 1}, 'start': {'character': 4, 'line': 1}}, 'code': 2304, 'message': 'oops'}] \ }, \ 'range': {'end': {'character': 5, 'line': 1}, 'start': {'character': 4, 'line': 1}}, \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))} @@ -540,7 +540,7 @@ Execute(LSP code action requests should be sent only for error with code): \ [ \ [0, 'textDocument/codeAction', { \ 'context': { - \ 'diagnostics': [{'range': {'end': {'character': 5, 'line': 1}, 'start': {'character': 4, 'line': 1}}, 'code': 2304, 'message': 'oops'}] + \ 'diagnostics': [{'range': {'end': {'character': 6, 'line': 1}, 'start': {'character': 4, 'line': 1}}, 'code': 2304, 'message': 'oops'}] \ }, \ 'range': {'end': {'character': 5, 'line': 1}, 'start': {'character': 4, 'line': 1}}, \ 'textDocument': {'uri': ale#path#ToURI(expand('%:p'))}