Commit Graph

2 Commits

Author SHA1 Message Date
Suzy Mueller 6f2254e651 internal/lsp: adjust extract function range if block statement
If the selected region is a block statement, gopls
does not return a valid function extraction. This
change adjusts the range to be the statements inside
of the selected block statement.

Fixes golang/go#48963

Change-Id: I9b1fb5005f961f30c1fa0333cd1f2050ed5eedef
Reviewed-on: https://go-review.googlesource.com/c/tools/+/357615
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-10-22 02:18:41 +00:00
Heschi Kreinick aeb8e36929 internal/lsp: remove multi-module support in tests
Mostly a rollback of CL 217541. No changes in the actual tests.

Change-Id: I910551d4750822bd2d8c5039d1cf194e42d01500
Reviewed-on: https://go-review.googlesource.com/c/tools/+/256363
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2020-09-22 16:28:30 +00:00