diff options
Diffstat (limited to 'subprojects/frontend/src/xtext/ContentAssistService.ts')
-rw-r--r-- | subprojects/frontend/src/xtext/ContentAssistService.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/subprojects/frontend/src/xtext/ContentAssistService.ts b/subprojects/frontend/src/xtext/ContentAssistService.ts index ac8ab36a..d42dde14 100644 --- a/subprojects/frontend/src/xtext/ContentAssistService.ts +++ b/subprojects/frontend/src/xtext/ContentAssistService.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | 2 | * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/> |
3 | * | 3 | * |
4 | * SPDX-License-Identifier: EPL-2.0 | 4 | * SPDX-License-Identifier: EPL-2.0 |
5 | */ | 5 | */ |
@@ -108,7 +108,11 @@ function createCompletion(entry: ContentAssistEntry): Completion { | |||
108 | boost = -90; | 108 | boost = -90; |
109 | break; | 109 | break; |
110 | default: | 110 | default: |
111 | { | 111 | if (entry.proposal.startsWith('::')) { |
112 | // Move absolute names below relative names, | ||
113 | // they should only be preferred if no relative name is available. | ||
114 | boost = -60; | ||
115 | } else { | ||
112 | // Penalize qualified names (vs available unqualified names). | 116 | // Penalize qualified names (vs available unqualified names). |
113 | const extraSegments = entry.proposal.match(/::/g)?.length || 0; | 117 | const extraSegments = entry.proposal.match(/::/g)?.length || 0; |
114 | boost = Math.max(-5 * extraSegments, -50); | 118 | boost = Math.max(-5 * extraSegments, -50); |