From 1bcf67c9cb49ca7dff98883ae7d19d6dd2288ae3 Mon Sep 17 00:00:00 2001 From: Peter Weinberger Date: Tue, 10 Dec 2019 14:26:03 -0500 Subject: [PATCH] internal/lsp: Make Text in DidSave at *string rather than a string Fix code.ts to match CL 210780. Change-Id: Iaaa1f8b78d483e4281e6d513cf4d20ae44e46cb7 Reviewed-on: https://go-review.googlesource.com/c/tools/+/210783 Run-TryBot: Peter Weinberger Reviewed-by: Rebecca Stambler TryBot-Result: Gobot Gobot --- internal/lsp/protocol/typescript/code.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/internal/lsp/protocol/typescript/code.ts b/internal/lsp/protocol/typescript/code.ts index 1303bcc31c..de8a051d40 100644 --- a/internal/lsp/protocol/typescript/code.ts +++ b/internal/lsp/protocol/typescript/code.ts @@ -482,9 +482,15 @@ function goInterface(d: Data, nm: string) { // There's a difference between a nil Range and a zero Range (at the // beginning of files) if (d.name == 'TextDocumentContentChangeEvent' && - n.name.getText() == 'range') + n.name.getText() == 'range') { gt = '*' + gt; - if (d.name == 'CodeAction' && n.name.getText() == 'command') gt = '*' + gt; + } + if (d.name == 'CodeAction' && n.name.getText() == 'command') { + gt = '*' + gt; + } + if (d.name == 'DidSaveTextDocumentParams' && n.name.getText() == 'text') { + gt = '*' + gt; + } ans = ans.concat(`${goName(n.name.getText())} ${gt}`, json, '\n') }; d.properties.forEach(g)