Skip to content

Commit

Permalink
Fixed #41: "No completion of local label"
Browse files Browse the repository at this point in the history
  • Loading branch information
maziac committed Jul 17, 2020
1 parent 53f6354 commit bb7058d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# 1.5.3
- Fixes:
- #40: "Hover display incorrect"
- #41: "No completion of local label"

# 1.5.2
- Fixes:
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/CompletionProposalsProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bb7058d

Please sign in to comment.