Skip to content

Commit f34590e

Browse files
committed
Fix keyword completion silently returning zero suggestions
Curated supplemental keywords (STORE, AIM, CVTYPE, AMF, PREFT, ZCRITVIS, SPECHA, SPECHB, SPECHG, SPECHH) were merged into the runtime index without a sections array, even though several call sites (including the completion provider's item.detail) access entry.sections unconditionally. Hitting any of these 10 keywords during Array.map aborted the entire keyword-name completion list for every prefix, since a thrown callback discards all results. Default sections to [] when merging the supplement so every entry satisfies the sections: string[] contract.
1 parent 05aa546 commit f34590e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

vscode-extension/src/keyword-supplement.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ export const SUPPLEMENTAL_KEYWORDS: AnalysisIndex = {
6666
export function applyKeywordSupplement(index: AnalysisIndex): AnalysisIndex {
6767
for (const name in SUPPLEMENTAL_KEYWORDS) {
6868
if (index[name] === undefined) {
69-
index[name] = SUPPLEMENTAL_KEYWORDS[name] as AnalysisEntry;
69+
const entry = SUPPLEMENTAL_KEYWORDS[name] as AnalysisEntry;
70+
index[name] = { sections: [], ...entry };
7071
}
7172
}
7273
return index;

0 commit comments

Comments
 (0)