mirror of https://github.com/golang/go.git
Fix the imports text edits by computing it on first principles. This fixes at least a couple bugs: - Incorrect handling of positions between \r and \n with windows line endings. - Incorrect computation of edits when the imports source prefix is synthetically terminated with just \n, but the actual source has \r\n. This is an unsatisfying solution, necessary because of the interaction of token.File with file termination (token.File does not capture this information). Efforts to fix token.File proved complicated, and this is causing problems for our users, so I think we should do this for now. For golang/vscode-go#1489 Change-Id: I235caf3960c7201af93800d65546fbab5c6e3f4b Reviewed-on: https://go-review.googlesource.com/c/tools/+/319129 Trust: Rebecca Stambler <rstambler@golang.org> Trust: Robert Findley <rfindley@google.com> Run-TryBot: Rebecca Stambler <rstambler@golang.org> Run-TryBot: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org> |
||
|---|---|---|
| .. | ||
| doc.go | ||
| env.go | ||
| env_test.go | ||
| expectation.go | ||
| regtest.go | ||
| runner.go | ||
| wrappers.go | ||