mirror of
https://github.com/golang/go
synced 2024-11-18 16:54:43 -07:00
b6bf295893
If a file ends with an empty newline, go/token treats the newline as the final character of the previous line. VSCode, however, treats this as a final line with no characters. We handle this by determining if the file we are formatting ends with a newline character and updating the protocol ranges accordingly. Change-Id: Id8be0fd776ae65c8f0f937f3e718825e407cb217 Reviewed-on: https://go-review.googlesource.com/c/150338 Reviewed-by: Ian Cottrell <iancottrell@google.com> Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> |
||
---|---|---|
.. | ||
fastwalk | ||
gopathwalk | ||
jsonrpc2 | ||
lsp | ||
memcache | ||
semver |