FIxes #2468: [json] Intellisense Provides Strange Suggestions In Property Value
This commit is contained in:
parent
90a863de88
commit
cfa2dd25e0
|
@ -207,8 +207,10 @@ export class JSONCompletion {
|
||||||
|
|
||||||
private getSchemaLessValueSuggestions(doc: Parser.JSONDocument, node: Parser.ASTNode, offset: number, document: ITextDocument, collector: ISuggestionsCollector): void {
|
private getSchemaLessValueSuggestions(doc: Parser.JSONDocument, node: Parser.ASTNode, offset: number, document: ITextDocument, collector: ISuggestionsCollector): void {
|
||||||
let collectSuggestionsForValues = (value: Parser.ASTNode) => {
|
let collectSuggestionsForValues = (value: Parser.ASTNode) => {
|
||||||
let content = this.getMatchingSnippet(value, document);
|
if (!value.contains(offset)) {
|
||||||
collector.add({ kind: this.getSuggestionKind(value.type), label: content, insertText: content, documentation: '' });
|
let content = this.getMatchingSnippet(value, document);
|
||||||
|
collector.add({ kind: this.getSuggestionKind(value.type), label: content, insertText: content, documentation: '' });
|
||||||
|
}
|
||||||
if (value.type === 'boolean') {
|
if (value.type === 'boolean') {
|
||||||
this.addBooleanSuggestion(!value.getValue(), collector);
|
this.addBooleanSuggestion(!value.getValue(), collector);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue