From 6e04913cbbac05c5c0c9d8f237717e292f700e76 Mon Sep 17 00:00:00 2001 From: Rebecca Stambler Date: Thu, 20 Jun 2019 14:52:06 -0400 Subject: [PATCH] internal/lsp: fix bug in creating token.Files Change-Id: Ib133762b6848d78fd3d264b211b44b36316a551d Reviewed-on: https://go-review.googlesource.com/c/tools/+/183260 Run-TryBot: Rebecca Stambler TryBot-Result: Gobot Gobot Reviewed-by: Ian Cottrell --- internal/lsp/cache/token.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/lsp/cache/token.go b/internal/lsp/cache/token.go index 6cd0d8e5..0b2b6976 100644 --- a/internal/lsp/cache/token.go +++ b/internal/lsp/cache/token.go @@ -84,5 +84,6 @@ func tokenFile(ctx context.Context, c *cache, fh source.FileHandle) (*token.File if tok == nil { return nil, fmt.Errorf("no token.File for %s", fh.Identity().URI) } + tok.SetLinesForContent(buf) return tok, nil }