Skip to content

Commit

Permalink
complete: fix off by one
Browse files Browse the repository at this point in the history
Fix off by one in column calculation introduced in fatih#3617.

Fixes fatih#3625
  • Loading branch information
bhcleek committed Jan 6, 2024
1 parent b75321f commit 1c010e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/go/complete.vim
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function! go#complete#Complete(findstart, base) abort
"findstart = 1 when we need to get the start of the match
if a:findstart == 1
let [l:line, l:col] = getpos('.')[1:2]
let [l:line, l:col] = go#lsp#lsp#Position(l:line, l:col)
let [l:line, l:col] = go#lsp#lsp#Position(l:line, l:col-1)
let l:completion = go#lsp#Completion(expand('%:p'), l:line, l:col, funcref('s:handler', [l:state]))
if l:completion
return -3
Expand Down

0 comments on commit 1c010e6

Please sign in to comment.