1
0
mirror of https://github.com/golang/go synced 2024-11-18 17:14:45 -07:00
go/internal/span
Paul Jolly 7af746645d internal/span: fix another off-by-one in ToUTF16Column
The current tests contain a bug in the priming of funnyString; the
subslicing leaves the resulting content slice with a capacity greater
than its length. This allowed a bug ToUTF16Column to sneak through where
we were not using 0-based column as the offset within the line.

Fix the priming of funnyString, and fix the implementation of
ToUTF16Column.

Change-Id: I2618878d85bba26f52f99a3fc136ad21fe198dfc
Reviewed-on: https://go-review.googlesource.com/c/tools/+/174357
Reviewed-by: Ian Cottrell <iancottrell@google.com>
Run-TryBot: Ian Cottrell <iancottrell@google.com>
2019-04-29 18:16:56 +00:00
..
parse.go internal/span: change to private fields 2019-03-15 18:05:47 +00:00
span_test.go internal/span: change to private fields 2019-03-15 18:05:47 +00:00
span.go internal/lsp/protocol: add a compare function for span.URI 2019-04-17 22:30:02 +00:00
token111.go internal/span: adding a source location package to unify the pos conversions 2019-03-08 14:21:31 +00:00
token112.go internal/span: adding a source location package to unify the pos conversions 2019-03-08 14:21:31 +00:00
token_test.go internal/span: change to private fields 2019-03-15 18:05:47 +00:00
token.go internal/lsp: improve signatureHelp in various cases 2019-04-17 18:10:49 +00:00
uri_test.go internal/span: adding a source location package to unify the pos conversions 2019-03-08 14:21:31 +00:00
uri.go internal/lsp: use strings.EqualFold instead of == 2019-04-18 15:28:51 +00:00
utf16_test.go internal/span: fix another off-by-one in ToUTF16Column 2019-04-29 18:16:56 +00:00
utf16.go internal/span: fix another off-by-one in ToUTF16Column 2019-04-29 18:16:56 +00:00