From b5c8702cbcdff79d283862ccb7e0f446fbd84515 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Sun, 21 Oct 2018 14:43:29 +0200 Subject: [PATCH] update completions on delete while comp menu opened --- src/ce_synmemo.pas | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ce_synmemo.pas b/src/ce_synmemo.pas index 7b0c40b7..c89cca99 100644 --- a/src/ce_synmemo.pas +++ b/src/ce_synmemo.pas @@ -2765,8 +2765,17 @@ end; procedure TCESynMemo.completionDeleteKey(sender: TObject); begin - if fCompletionMenuAutoClose and (fCompletion.CurrentString.length < 2) then - fCompletion.TheForm.Close; + if fCompletionMenuAutoClose then + begin + if fCompletion.CurrentString.length < 2 then + fCompletion.TheForm.Close + end + else if CaretX > 0 then + begin + caretX := CaretX - 1; + getCompletionList(); + caretX := CaretX + 1; + end; end; procedure TCESynMemo.getCompletionList;