Skip to content

Commit

Permalink
Bug fix for autocompletion. I dropped this line of code during a merge
Browse files Browse the repository at this point in the history
  • Loading branch information
bscan committed Oct 22, 2023
1 parent c783aaf commit 295426c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 0.7.6 2023-10-22
- Bug fix for autocompletion

## 0.7.5 2023-10-22
- Documentation available on hover and autcompletion
- Supress namespace::clean/autoclean which would clean symbol table before inspection
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Code navigation, autocompletion, syntax checking, and linting for Perl",
"author": "bscan",
"license": "MIT",
"version": "0.7.5",
"version": "0.7.6",
"icon": "images/camel_icon.png",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "perlnavigator-server",
"description": "Perl language server",
"version": "0.7.5",
"version": "0.7.6",
"author": "bscan",
"license": "MIT",
"engines": {
Expand Down
3 changes: 2 additions & 1 deletion server/src/completion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ function getPrefix(text: string, position: number): CompletionPrefix {
const canShift = (c: string) => /[\w\:\>\-]/.exec(c);
let l = position - 1; // left
for (; l >= 0 && canShift(text[l]); --l);
let lCh = "";

if (l < 0 || text[l] != "$" && text[l] != "@" && text[l] != "%") ++l;

let symbol = text.substring(l, position);
const prefix = text.substring(0, l);
Expand Down

0 comments on commit 295426c

Please sign in to comment.