diff options
author | James <89495599+IAKOBVS@users.noreply.github.com> | 2023-10-17 07:23:48 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-17 07:23:48 +0700 |
commit | 162cafb60b9c14dfa6cf0eeea7dda0206c44501a (patch) | |
tree | df8f2c0fa4091354fb49f8790ac868b7e43abb94 | |
parent | 3b0ee03e657976b39771cf8ee3317bcdf5212324 (diff) | |
download | PerlNavigator-162cafb60b9c14dfa6cf0eeea7dda0206c44501a.zip |
Update completion.ts
-rw-r--r-- | server/src/completion.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/completion.ts b/server/src/completion.ts index 69a8e37..3129d1b 100644 --- a/server/src/completion.ts +++ b/server/src/completion.ts @@ -44,7 +44,7 @@ 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); - if (l < 0 && text[l] != "$" && text[l] != "@" && text[l] != "%") ++l; + if (l < 0 || text[l] != "$" && text[l] != "@" && text[l] != "%") ++l; const symbol = text.substring(l, position); return { symbol: symbol, charStart: l, charEnd: position }; } |