diff --git a/CHANGELOG.md b/CHANGELOG.md
index dfcbbf43..37ffd9fc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,11 @@
- Completion, while menu opened, Backspace had for effect to also delete next char.
This was an old workaround that has no reason to be maintained anymore.
+## Bugs fixed
+
+- Completion, option `autoCallCompletion` did not work when using `textCompletion` in non-D sources.
+- Completion, does not allow `autoCallCompletion` when key modifiers are used, e.g CTRL+Z.
+
# v3.9.18
## Enhancements
diff --git a/src/u_synmemo.pas b/src/u_synmemo.pas
index 01c03516..484ad01e 100644
--- a/src/u_synmemo.pas
+++ b/src/u_synmemo.pas
@@ -3704,11 +3704,12 @@ begin
VK_OEM_PERIOD, VK_DECIMAL: fCanAutoDot := (fLastUp <> VK_OEM_PERIOD) and (fLastUp <> VK_DECIMAL);
end;
inherited;
- if fAutoCallCompletion and fIsDSource and (not fCompletion.IsActive) and
- (Key < $80) and (char(Key) in ['a'..'z', 'A'..'Z', '_']) then
+ if fAutoCallCompletion and (fIsDSource or textCompletion or alwaysAdvancedFeatures) and
+ (not fCompletion.IsActive) and (Key < $80) and (char(Key) in ['a'..'z', 'A'..'Z', '_']) then
begin
- fCompletion.Execute(GetWordAtRowCol(LogicalCaretXY),
- ClientToScreen(point(CaretXPix, CaretYPix + LineHeight)));
+ if Shift = [] then
+ fCompletion.Execute(GetWordAtRowCol(LogicalCaretXY),
+ ClientToScreen(point(CaretXPix, CaretYPix + LineHeight)));
end;
if (Key = VK_BACK) and fCallTipWin.Visible then
showCallTips(true);