From 1c010e62116b2bae55aae1777be5cf6ce345093c Mon Sep 17 00:00:00 2001 From: Billie Cleek Date: Wed, 3 Jan 2024 19:04:25 -0800 Subject: [PATCH] complete: fix off by one Fix off by one in column calculation introduced in #3617. Fixes #3625 --- autoload/go/complete.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/go/complete.vim b/autoload/go/complete.vim index b256e8cf20..58421b07ab 100644 --- a/autoload/go/complete.vim +++ b/autoload/go/complete.vim @@ -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