Skip to content

Commit

Permalink
Make sure an opening brace added while autocompletion is active alway…
Browse files Browse the repository at this point in the history
…s cancels autocompletion instead of only doing this when a calltip is found.
  • Loading branch information
martijnlaan committed Dec 28, 2024
1 parent 4786a09 commit 7096563
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Projects/Src/IDE.MainForm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -5559,8 +5559,16 @@ procedure TMainForm.MemoCharAdded(Sender: TObject; Ch: AnsiChar);
end else if FActiveMemo.AutoCompleteActive then begin
if Ch = '(' then begin
Inc(FCallTipState.BraceCount);
if FOptions.AutoCallTips then
if FOptions.AutoCallTips then begin
InitiateCallTip(Ch);
if not FActiveMemo.CallTipActive then begin
{ Normally the calltip activation means any active autocompletion gets
cancelled by Scintilla but if the current word has no call tip then
we should make sure ourselves that the added brace still cancels
the currently active autocompletion }
DoAutoComplete := True;
end;
end;
end else if Ch = ')' then
Dec(FCallTipState.BraceCount)
else
Expand Down

0 comments on commit 7096563

Please sign in to comment.