Skip to content

Commit

Permalink
[INTERNAL] Fix reference complemtion
Browse files Browse the repository at this point in the history
  • Loading branch information
GehDoc committed Nov 24, 2023
1 parent afb269e commit f013d4e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 0 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 5 additions & 2 deletions src/languageFeatures/pathCompletions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/test/pathCompletion.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
]);
});
Expand Down

0 comments on commit f013d4e

Please sign in to comment.