fix #121 - Words completions dont not fully take idents containing digits

This commit is contained in:
Basile Burg 2023-07-06 20:26:09 +02:00
parent 75ed028f58
commit c2c987cdda
1 changed files with 2 additions and 1 deletions

View File

@ -2931,6 +2931,7 @@ var
h: TStringHashSet;
const
c: TSysCharSet = ['A'..'Z', 'a'..'z', '_'];
a: TSysCharSet = ['A'..'Z', 'a'..'z', '_', '0' .. '9'];
begin
fCompletion.Position := 0;
@ -2962,7 +2963,7 @@ begin
r := TStringRange.create(lines[i]);
while not r.empty do
begin
w := r.popUntil(c)^.takeWhile(c).yield;
w := r.popUntil(c)^.takeWhile(a).yield;
if (w.length >= fTextCompletionMinLength) and not h.contains(w) then
begin
h.insert(w);