From 91543147e31248677f3a92c0ee8f88984fc2bbb7 Mon Sep 17 00:00:00 2001 From: Muir Manders Date: Wed, 2 Oct 2019 14:10:34 -0700 Subject: [PATCH] internal/lsp: restore "IsIncomplete" completion flag Looks like I dropped this line accidentally after resolving a merge conflict. I restored the original code checking the "deep" option in addition to my intended drive-by fix of also checking the "fuzzy" option. In either case the client should not cache completion candidates. Change-Id: I586daa28e3e4e4cc64665ba507245be4e91b08f2 Reviewed-on: https://go-review.googlesource.com/c/tools/+/198490 Reviewed-by: Rebecca Stambler Run-TryBot: Rebecca Stambler TryBot-Result: Gobot Gobot --- internal/lsp/completion.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/lsp/completion.go b/internal/lsp/completion.go index acb4899d43..04e9edb275 100644 --- a/internal/lsp/completion.go +++ b/internal/lsp/completion.go @@ -46,7 +46,8 @@ func (s *Server) completion(ctx context.Context, params *protocol.CompletionPara return &protocol.CompletionList{ // When using deep completions/fuzzy matching, report results as incomplete so // client fetches updated completions after every key stroke. - Items: toProtocolCompletionItems(candidates, rng, options), + IsIncomplete: options.Completion.Deep || options.Completion.FuzzyMatching, + Items: toProtocolCompletionItems(candidates, rng, options), }, nil }