Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ type internal FSharpCompletionProvider
asyncMaybe {
let! parseResults, parsedInput, checkFileResults = checker.ParseAndCheckDocument(filePath, textVersionHash, sourceText.ToString(), options, allowStaleResults = true)

//#if DEBUG
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

;-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... :)

//Logging.Logging.logInfof "AST:\n%+A" parsedInput
//#endif

let textLines = sourceText.Lines
let caretLinePos = textLines.GetLinePosition(caretPosition)
Expand Down Expand Up @@ -192,7 +194,7 @@ type internal FSharpCompletionProvider
declarationItemsCache.Add(completionItem.DisplayText, declItem)
results.Add(completionItem))

if results.Count > 0 && not declarations.IsForType && not declarations.IsError then
if results.Count > 0 && not declarations.IsForType && not declarations.IsError && List.isEmpty qualifyingNames then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isNil?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think isNil is used in the compiler and FCS exclusively. We should use normal functions in FSharp.Editor.

let lineStr = textLines.[caretLinePos.Line].ToString()
match UntypedParseImpl.TryGetCompletionContext(Pos.fromZ caretLinePos.Line caretLinePos.Character, Some parseResults, lineStr) with
| None -> results.AddRange(keywordCompletionItems)
Expand Down