mirror of https://gitlab.com/basile.b/dexed.git
added font.size to editor cache
This commit is contained in:
parent
21894bffc0
commit
5db4627eff
|
@ -30,6 +30,7 @@ type
|
||||||
fFolds: TCollection;
|
fFolds: TCollection;
|
||||||
fCaretPosition: Integer;
|
fCaretPosition: Integer;
|
||||||
fSelectionEnd: Integer;
|
fSelectionEnd: Integer;
|
||||||
|
fFontSize: Integer;
|
||||||
fSourceFilename: string;
|
fSourceFilename: string;
|
||||||
procedure setFolds(someFolds: TCollection);
|
procedure setFolds(someFolds: TCollection);
|
||||||
published
|
published
|
||||||
|
@ -37,6 +38,7 @@ type
|
||||||
property sourceFilename: string read fSourceFilename write fSourceFilename;
|
property sourceFilename: string read fSourceFilename write fSourceFilename;
|
||||||
property folds: TCollection read fFolds write setFolds;
|
property folds: TCollection read fFolds write setFolds;
|
||||||
property selectionEnd: Integer read fSelectionEnd write fSelectionEnd;
|
property selectionEnd: Integer read fSelectionEnd write fSelectionEnd;
|
||||||
|
property fontSize: Integer read fFontSize write fFontSize;
|
||||||
public
|
public
|
||||||
constructor create(aComponent: TComponent); override;
|
constructor create(aComponent: TComponent); override;
|
||||||
destructor destroy; override;
|
destructor destroy; override;
|
||||||
|
@ -146,6 +148,7 @@ begin
|
||||||
fCaretPosition := fMemo.SelStart;
|
fCaretPosition := fMemo.SelStart;
|
||||||
fSourceFilename := fMemo.fileName;
|
fSourceFilename := fMemo.fileName;
|
||||||
fSelectionEnd := fMemo.SelEnd;
|
fSelectionEnd := fMemo.SelEnd;
|
||||||
|
fFontSize := fMemo.Font.Size;
|
||||||
//
|
//
|
||||||
// TODO-cEditor Cache: >nested< folding persistence
|
// TODO-cEditor Cache: >nested< folding persistence
|
||||||
// cf. other ways: http://forum.lazarus.freepascal.org/index.php?topic=26748.msg164722#msg164722
|
// cf. other ways: http://forum.lazarus.freepascal.org/index.php?topic=26748.msg164722#msg164722
|
||||||
|
@ -172,6 +175,9 @@ var
|
||||||
itm : TCEFoldCache;
|
itm : TCEFoldCache;
|
||||||
begin
|
begin
|
||||||
if fMemo = nil then exit;
|
if fMemo = nil then exit;
|
||||||
|
//
|
||||||
|
if fFontSize > 0 then
|
||||||
|
fMemo.Font.Size := fFontSize;
|
||||||
// Currently collisions are not handled.
|
// Currently collisions are not handled.
|
||||||
if fMemo.fileName <> fSourceFilename then exit;
|
if fMemo.fileName <> fSourceFilename then exit;
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue