From 9943ca1a1cd624c8890736efe48e184846b017ba Mon Sep 17 00:00:00 2001 From: richardatphilo <43018088+richardatphilo@users.noreply.github.com> Date: Sun, 6 Jan 2019 23:24:34 -0800 Subject: [PATCH] Enable 'Find All References' to work when the reference has been selected. (#2226) --- src/goReferences.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/goReferences.ts b/src/goReferences.ts index 6033c6a54..73985c7bb 100644 --- a/src/goReferences.ts +++ b/src/goReferences.ts @@ -33,7 +33,7 @@ export class GoReferenceProvider implements vscode.ReferenceProvider { let filename = canonicalizeGOPATHPrefix(document.fileName); let cwd = path.dirname(filename); - let offset = byteOffsetAt(document, position); + let offset = byteOffsetAt(document, wordRange.start); let env = getToolsEnvVars(); let buildTags = vscode.workspace.getConfiguration('go', document.uri)['buildTags']; let args = buildTags ? ['-tags', buildTags] : [];