text completions, tweaks to partially ignore comments

This commit is contained in:
Basile Burg 2025-01-08 08:47:18 +01:00
parent a45e590521
commit d4766a2d2a
1 changed files with 9 additions and 0 deletions

View File

@ -2994,6 +2994,15 @@ begin
r := TStringRange.create(lines[i]);
while not r.empty do
begin
r.popWhile([' ', #9]);
if r.startsWith('//') then
r.popUntil(#0);
if r.startsWith('/*') then
begin
r.popFrontN(2);
r.popUntil('/');
r.popFront();
end;
w := r.popUntil(c)^.takeWhile(a).yield;
if (w.length >= fTextCompletionMinLength) and not h.contains(w) then
begin