go/internal/lsp/testdata/references
Suzy Mueller a66849847a internal/lsp: find references for ident before selector
Previously, if the position was before the "." in a selector,
pathEnclosingObjNode would move the position to right after the
".". This created confusing behavior where editors would highlight
the identifier before the ".", but references and go to definition
would be applied on the identified after the selector. This change
removes the shifting of the position if found on a selector.

Fixes golang/go#47408

Change-Id: If2504e7d5af2fae24b97c5c1e88b9cbe67aaaaf3
Reviewed-on: https://go-review.googlesource.com/c/tools/+/338789
Trust: Suzy Mueller <suzmue@golang.org>
Run-TryBot: Suzy Mueller <suzmue@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2021-08-02 19:06:04 +00:00
..
another internal/lsp: find references for ident before selector 2021-08-02 19:06:04 +00:00
interfaces internal/lsp/source: show references to interface methods 2020-10-06 22:15:05 +00:00
other
refs.go
refs_test.go