-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/lsp: fix end positions for multi-line comments with CRLF lines
The previous work-around assumed that the end of the comment would be off by one line, when in reality, it is off by the offset of the number of \r in the comment, which may result in the comment end position being off by multiple lines. Work around this by scanning for the end of the comment position using text/scanner. Fixes golang/go#42646 Change-Id: Icc33e889546f324c6b65b55a98dea587f84c8f01 Reviewed-on: https://go-review.googlesource.com/c/tools/+/270879 Trust: Rebecca Stambler <rstambler@golang.org> Run-TryBot: Rebecca Stambler <rstambler@golang.org> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
- Loading branch information
1 parent
bd56c0a
commit 598b068
Showing
2 changed files
with
64 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters