mirror of https://github.com/golang/go.git
textDocument/didChange events need to indicate if the change includes
the full file content or just a diff. Previously, the
contentChange.Range field was a pointer, so if it was nil, then we would
conclude that the file change was for the whole file. Now, the best we
can do is compare it to an empty range, but this still doesn't work if
you are at the beginning of a file. I think that the range needs to be a
pointer for this to work correctly.
Also, some minor changes that came up along the way while debugging:
(1) Don't close over the *cache variable for fear of pinning anything in
memory
(2) Improve the error message when the token.File is nil
(3) Check for a nil token.File earlier
Change-Id: If9f310e92b7fb740b45e6cd3f9ca678a6fb52ff6
Reviewed-on: https://go-review.googlesource.com/c/tools/+/207906
Reviewed-by: Heschi Kreinick <heschi@google.com>
|
||
|---|---|---|
| .. | ||
| apidiff | ||
| fastwalk | ||
| gopathwalk | ||
| imports | ||
| jsonrpc2 | ||
| lsp | ||
| memoize | ||
| module | ||
| semver | ||
| span | ||
| telemetry | ||
| testenv | ||
| tool | ||
| xcontext | ||