diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ab0659..5ec9e70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,10 +11,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [INTERNAL] WIP - Update to vscode 1.69.2 - [DEPENDENCIES] update to latest vscode-nls -### TODO before release -- FIXME in pathCompletion.test.ts -- finalize to move tests out of quarantine - ## [1.3.24] - 20230907 diff --git a/src/languageFeatures/pathCompletions.ts b/src/languageFeatures/pathCompletions.ts index 8438747..5704844 100644 --- a/src/languageFeatures/pathCompletions.ts +++ b/src/languageFeatures/pathCompletions.ts @@ -116,8 +116,11 @@ export class TextileVsCodePathCompletionProvider implements vscode.CompletionIte case CompletionContextKind.LinkDefinition: case CompletionContextKind.Link: { const items: vscode.CompletionItem[] = []; - for await (const item of this.provideReferenceSuggestions(document, position, context)) { - items.push(item); // Modified for Textile + if (context.linkPrefix.length === 0) { + // Modified for Textile : links & references suggested together + for await (const item of this.provideReferenceSuggestions(document, position, context)) { + items.push(item); + } } const isAnchorInCurrentDoc = context.anchorInfo && context.anchorInfo.beforeAnchor.length === 0; diff --git a/src/test/pathCompletion.test.ts b/src/test/pathCompletion.test.ts index 61fe87d..3bb4d36 100644 --- a/src/test/pathCompletion.test.ts +++ b/src/test/pathCompletion.test.ts @@ -298,7 +298,6 @@ suite('Textile: Path completions', () => { ), workspace); assertCompletionsEqual(completions, [ - { label: 'def' }, // FIXME : should be filtered by the path { label: 'file.textile', insertText: 'file.textile' }, ]); });