diff --git a/CHANGELOG.md b/CHANGELOG.md index 1539834d..b4cbcc1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Fixed windows release (#116). From now ldc2 >= 1.31.0 is a minimal requirement. - The context lines of the diff viewer were not legible whith dark themes. +- Font size of reloaded document not always correct. # v3.9.25 diff --git a/src/u_synmemo.pas b/src/u_synmemo.pas index 9e67ca20..57aa5559 100644 --- a/src/u_synmemo.pas +++ b/src/u_synmemo.pas @@ -98,6 +98,7 @@ type fCaretPosition: Integer; fSelectionEnd: Integer; fFontSize: Integer; + fFontHeight: Integer; fSourceFilename: string; procedure setFolds(someFolds: TCollection); published @@ -106,6 +107,7 @@ type property folds: TCollection read fFolds write setFolds; property selectionEnd: Integer read fSelectionEnd write fSelectionEnd; property fontSize: Integer read fFontSize write fFontSize; + property fontHeight: Integer read fFontHeight write fFontHeight; public constructor create(aComponent: TComponent); override; destructor destroy; override; @@ -846,6 +848,7 @@ begin fSourceFilename := fMemo.fileName; fSelectionEnd := fMemo.SelEnd; fFontSize := fMemo.Font.Size; + fFontHeight := fMemo.Font.Height; TEditorHintWindow.FontSize := fMemo.Font.Size; prev := fMemo.Lines.Count-1; @@ -873,8 +876,10 @@ begin if fMemo.isNotAssigned then exit; - if fFontSize > 0 then + if fFontSize <> 0 then fMemo.Font.Size := fFontSize; + if fFontHeight <> 0 then + fMemo.Font.Height := fFontHeight; // Currently collisions are not handled. if fMemo.fileName <> fSourceFilename then