You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
internal/lsp/template: fix error that causes crashes
When LSP asks for a completion it sends a position, which is the
position of the first character after the cursor. The old code
mistakenly thought it was the position of the last character seen,
and sometimes produced an impossible slice to parse.
The example at line 29 of completion_test.go used to cause a panic.
Fixes: golang/go#49600
Change-Id: I772fe38a1a12d3876ef866819e6a878b297bb92f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/366036
Run-TryBot: Peter Weinberger <[email protected]>
gopls-CI: kokoro <[email protected]>
TryBot-Result: Go Bot <[email protected]>
Trust: Peter Weinberger <[email protected]>
Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
0 commit comments