mirror of
https://github.com/golang/go
synced 2024-11-18 16:54:43 -07:00
c229649527
We were crashing in cases like: 1: func foo() { 2: if b<> <EOF> We were trying to get the line start position for line 3, but there is no line 3. Fix by bailing out early if we are the last line in the file because there is nothing to fix in that case. Fixes golang/go#37226. Change-Id: I4ad5746d7b55bdcc2de57c04e972c15a61084faa Reviewed-on: https://go-review.googlesource.com/c/tools/+/219498 Run-TryBot: Muir Manders <muir@mnd.rs> Reviewed-by: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> |
||
---|---|---|
.. | ||
apidiff | ||
fastwalk | ||
gopathwalk | ||
imports | ||
jsonrpc2 | ||
lsp | ||
memoize | ||
packagesinternal | ||
span | ||
telemetry | ||
testenv | ||
tool | ||
xcontext |