diff --git a/CHANGELOG.md b/CHANGELOG.md index d4667fd..9459430 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ # 1.5.3 - Fixes: - #40: "Hover display incorrect" + - #41: "No completion of local label" # 1.5.2 - Fixes: diff --git a/package-lock.json b/package-lock.json index 6f386f1..5892b0d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "asm-code-lens", - "version": "1.5.2", + "version": "1.5.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/CompletionProposalsProvider.ts b/src/CompletionProposalsProvider.ts index 0f7649f..4221ccf 100644 --- a/src/CompletionProposalsProvider.ts +++ b/src/CompletionProposalsProvider.ts @@ -168,8 +168,10 @@ export class CompletionProposalsProvider implements vscode.CompletionItemProvide // A previous non-local label was searched (and found), so label is local. item.filterText = label; // Change insert text - const k=moduleLabel.length+1+nonLocalLabel.length; - //const k=moduleLabel.length+nonLocalLabel.length; + let k=moduleLabel.length; + if (k>0) + k++; // For the dot '.' + k+=nonLocalLabel.length; let part = text.substr(k); item.insertText = part; // change shown text