From d4766a2d2a884645753ea96940a641bdb48ee660 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Wed, 8 Jan 2025 08:47:18 +0100 Subject: [PATCH] text completions, tweaks to partially ignore comments --- src/u_synmemo.pas | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/u_synmemo.pas b/src/u_synmemo.pas index a15ad3fa..4040d703 100644 --- a/src/u_synmemo.pas +++ b/src/u_synmemo.pas @@ -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