From 5901c852e502ffcf034b0b0ee5c9bbe8f259857e Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Fri, 11 Jan 2019 21:54:26 +0100 Subject: [PATCH] fix #398 - Freeze when pressing space on empty auto-complete list --- src/u_synmemo.pas | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/u_synmemo.pas b/src/u_synmemo.pas index d4db5b5c..c398742e 100644 --- a/src/u_synmemo.pas +++ b/src/u_synmemo.pas @@ -2782,6 +2782,11 @@ begin caretX := CaretX - 1; getCompletionList(); caretX := CaretX + 1; + if fCompletion.TheForm.ItemList.Count = 0 then + begin + fCompletion.TheForm.Close; + exit; + end; end; if fCompletionMenuAutoClose and (fCompletion.CurrentString.length < 2) then fCompletion.TheForm.Close;