fix #400 - inconsistencies in automcompletion, after backspace

This commit is contained in:
Basile Burg 2019-01-20 08:29:39 +01:00
parent 3734a3e222
commit f3db219e83
1 changed files with 9 additions and 2 deletions

View File

@ -2783,9 +2783,16 @@ procedure TDexedMemo.completionDeleteKey(sender: TObject);
begin
if CaretX > 0 then
begin
caretX := CaretX - 1;
// these "stinky" lines are necessary because
// the proc is called before deletion is effective
// i.e the deleted char is still there...
// related issues #400 and #398
caretX := caretX - 1;
ExecuteCommand(ecDeleteChar, #0, nil);
caretX := caretX + 1;
getCompletionList();
caretX := CaretX + 1;
if fCompletion.TheForm.ItemList.Count = 0 then
begin
fCompletion.TheForm.Close;