fix, option _textCompletionMinLength_ min length off-by-one.

This commit is contained in:
Basile Burg 2021-10-31 02:01:51 +02:00
parent d943bcfed2
commit 8a9ee73349
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
# v3.9.16-dev
- editor, option _textCompletionMinLength_ min length off-by-one.
# v3.9.15 # v3.9.15
## Bugs fixed ## Bugs fixed

View File

@ -2919,7 +2919,7 @@ begin
while not r.empty do while not r.empty do
begin begin
w := r.popUntil(c)^.takeWhile(c).yield; w := r.popUntil(c)^.takeWhile(c).yield;
if (w.length > fTextCompletionMinLength) and not h.contains(w) then if (w.length >= fTextCompletionMinLength) and not h.contains(w) then
begin begin
h.insert(w); h.insert(w);
fCompletion.ItemList.AddObject(w, TObject(PtrUint(dckText))); fCompletion.ItemList.AddObject(w, TObject(PtrUint(dckText)));