From 0d6da7fcd6de1c8b57a1ea8707097de22ea68598 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Mon, 13 Aug 2018 05:15:34 +0200 Subject: [PATCH] fix #354 - CallTips stacking doesn't work fine anymore --- src/ce_synmemo.pas | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/ce_synmemo.pas b/src/ce_synmemo.pas index 4d62c96c..c570c1e9 100644 --- a/src/ce_synmemo.pas +++ b/src/ce_synmemo.pas @@ -506,9 +506,9 @@ end; function TCEEditorCallTipWindow.CalcHintRect(MaxWidth: Integer; const AHint: String; AData: Pointer): TRect; begin - Font.Style := Font.Style + [fsBold]; + //Font.Style := Font.Style + [fsBold]; result := inherited CalcHintRect(MaxWidth, AHint, AData); - Font.Style := Font.Style - [fsBold]; + //Font.Style := Font.Style - [fsBold]; end; procedure TCEEditorCallTipWindow.Paint; @@ -2682,11 +2682,18 @@ begin fCallTipWin.FontSize := Font.Size; fCallTipWin.HintRect := fCallTipWin.CalcHintRect(0, tips, nil); fCallTipWin.OffsetHintRect(pnt, Font.Size * 2); + + // see procedure THintWindow.ActivateHint(const AHint: String); + // caused a regression in call tips stacking + fCallTipWin.Caption:= tips; + fCallTipWin.ActivateHint(tips); end; procedure TCESynMemo.hideCallTips; begin + if not fCallTipWin.Visible then + exit; fCallTipStrings.Clear; fCallTipWin.Hide; end; @@ -3548,7 +3555,7 @@ begin autoClosePair(autoCloseSingleQuote); ',': begin - hideCallTips; + //hideCallTips; showCallTips(true); end; '"': if autoCloseDoubleQuote in fAutoClosedPairs then