summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoload/ale/definition.vim2
-rw-r--r--test/test_go_to_definition.vader8
2 files changed, 5 insertions, 5 deletions
diff --git a/autoload/ale/definition.vim b/autoload/ale/definition.vim
index e68d279d..984a4f9d 100644
--- a/autoload/ale/definition.vim
+++ b/autoload/ale/definition.vim
@@ -49,7 +49,7 @@ function! ale#definition#HandleLSPResponse(conn_id, response) abort
for l:item in l:result
let l:filename = ale#path#FromURI(l:item.uri)
let l:line = l:item.range.start.line + 1
- let l:column = l:item.range.start.character
+ let l:column = l:item.range.start.character + 1
call ale#util#Open(l:filename, l:line, l:column, l:options)
break
diff --git a/test/test_go_to_definition.vader b/test/test_go_to_definition.vader
index c64db514..66c24fb6 100644
--- a/test/test_go_to_definition.vader
+++ b/test/test_go_to_definition.vader
@@ -213,7 +213,7 @@ Execute(Other files should be jumped to for LSP definition responses):
\ 'edit +3 ' . fnameescape(ale#path#Simplify(g:dir . '/completion_dummy_file')),
\ ],
\ g:expr_list
- AssertEqual [3, 7], getpos('.')[1:2]
+ AssertEqual [3, 8], getpos('.')[1:2]
AssertEqual {}, ale#definition#GetMap()
Execute(Locations inside the same file should be jumped to without using :edit):
@@ -235,7 +235,7 @@ Execute(Locations inside the same file should be jumped to without using :edit):
\ [
\ ],
\ g:expr_list
- AssertEqual [3, 7], getpos('.')[1:2]
+ AssertEqual [3, 8], getpos('.')[1:2]
AssertEqual {}, ale#definition#GetMap()
Execute(Other files should be jumped to in tabs for LSP definition responses):
@@ -258,7 +258,7 @@ Execute(Other files should be jumped to in tabs for LSP definition responses):
\ 'tabedit +3 ' . fnameescape(ale#path#Simplify(g:dir . '/completion_dummy_file')),
\ ],
\ g:expr_list
- AssertEqual [3, 7], getpos('.')[1:2]
+ AssertEqual [3, 8], getpos('.')[1:2]
AssertEqual {}, ale#definition#GetMap()
Execute(Definition responses with lists should be handled):
@@ -289,7 +289,7 @@ Execute(Definition responses with lists should be handled):
\ 'edit +3 ' . fnameescape(ale#path#Simplify(g:dir . '/completion_dummy_file')),
\ ],
\ g:expr_list
- AssertEqual [3, 7], getpos('.')[1:2]
+ AssertEqual [3, 8], getpos('.')[1:2]
AssertEqual {}, ale#definition#GetMap()
Execute(Definition responses with null response should be handled):