Skip to content

Commit

Permalink
Revert "Add separate 'AutoAutoComplete' setting for [Code]. No GUI yet."
Browse files Browse the repository at this point in the history
This reverts commit f422c53.
  • Loading branch information
martijnlaan committed Oct 10, 2024
1 parent 0d41d48 commit 53f5b3b
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions Projects/Src/IDE.MainForm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,6 @@ TMainForm = class(TUIStateForm)
PauseOnDebuggerExceptions: Boolean;
RunAsDifferentUser: Boolean;
AutoAutoComplete: Boolean;
AutoAutoCompleteCode: Boolean;
AutoCallTips: Boolean;
UseSyntaxHighlighting: Boolean;
ColorizeCompilerOutput: Boolean;
Expand Down Expand Up @@ -807,7 +806,6 @@ constructor TMainForm.Create(AOwner: TComponent);
FOptions.PauseOnDebuggerExceptions := Ini.ReadBool('Options', 'PauseOnDebuggerExceptions', True);
FOptions.RunAsDifferentUser := Ini.ReadBool('Options', 'RunAsDifferentUser', False);
FOptions.AutoAutoComplete := Ini.ReadBool('Options', 'AutoComplete', True);
FOptions.AutoAutoCompleteCode := Ini.ReadBool('Options', 'AutoCompleteCode', FOptions.AutoAutoComplete);
FOptions.AutoCallTips := Ini.ReadBool('Options', 'AutoCallTips', True);
FOptions.UseSyntaxHighlighting := Ini.ReadBool('Options', 'UseSynHigh', True);
FOptions.ColorizeCompilerOutput := Ini.ReadBool('Options', 'ColorizeCompilerOutput', True);
Expand Down Expand Up @@ -4385,7 +4383,6 @@ procedure TMainForm.TOptionsClick(Sender: TObject);
Ini.WriteBool('Options', 'PauseOnDebuggerExceptions', FOptions.PauseOnDebuggerExceptions);
Ini.WriteBool('Options', 'RunAsDifferentUser', FOptions.RunAsDifferentUser);
Ini.WriteBool('Options', 'AutoComplete', FOptions.AutoAutoComplete);
Ini.WriteBool('Options', 'AutoCompleteCode', FOptions.AutoAutoCompleteCode);
Ini.WriteBool('Options', 'AutoCallTips', FOptions.AutoCallTips);
Ini.WriteBool('Options', 'UseSynHigh', FOptions.UseSyntaxHighlighting);
Ini.WriteBool('Options', 'ColorizeCompilerOutput', FOptions.ColorizeCompilerOutput);
Expand Down Expand Up @@ -5377,14 +5374,6 @@ procedure TMainForm.MemoCharAdded(Sender: TObject; Ch: AnsiChar);
Result := TScintEdit.RawStringIsBlank(S);
end;

function AutoAutoComplete: Boolean;
begin
if FMemosStyler.GetSectionFromLineState(FActiveMemo.Lines.State[FActiveMemo.CaretLine]) = scCode then
Result := FOptions.AutoAutoCompleteCode
else
Result := FOptions.AutoAutoComplete;
end;

var
NewLine, PreviousLine, NewIndent, PreviousIndent: Integer;
begin
Expand Down Expand Up @@ -5450,11 +5439,11 @@ procedure TMainForm.MemoCharAdded(Sender: TObject; Ch: AnsiChar);
if DoAutoComplete then begin
case Ch of
'A'..'Z', 'a'..'z', '_', '#', '{', '[', '<':
if not FActiveMemo.AutoCompleteActive and AutoAutoComplete then
if not FActiveMemo.AutoCompleteActive and FOptions.AutoAutoComplete then
InitiateAutoComplete(Ch);
else
var RestartAutoComplete := (Ch in [' ', '.']) and
(AutoAutoComplete or FActiveMemo.AutoCompleteActive);
(FOptions.AutoAutoComplete or FActiveMemo.AutoCompleteActive);
FActiveMemo.CancelAutoComplete;
if RestartAutoComplete then
InitiateAutoComplete(Ch);
Expand Down

0 comments on commit 53f5b3b

Please sign in to comment.