mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-10 08:28:14 +02:00
SynEdit: fix r64487 #583d01104a causing AV
git-svn-id: trunk@64495 -
This commit is contained in:
parent
1e0749d516
commit
d7e459768f
@ -224,8 +224,6 @@ type
|
||||
function GetTextArea: TLazSynTextArea; override;
|
||||
protected
|
||||
procedure SetBackgroundColor(AValue: TColor); virtual;
|
||||
function GetExtraCharSpacing: integer;
|
||||
function GetExtraLineSpacing: integer;
|
||||
procedure SetExtraCharSpacing(AValue: integer); virtual;
|
||||
procedure SetExtraLineSpacing(AValue: integer); virtual;
|
||||
procedure SetForegroundColor(AValue: TColor); virtual;
|
||||
@ -254,8 +252,8 @@ type
|
||||
property Padding[Side: TLazSynBorderSide]: integer write SetPadding;
|
||||
property ForegroundColor: TColor write SetForegroundColor;
|
||||
property BackgroundColor: TColor write SetBackgroundColor;
|
||||
property ExtraCharSpacing: integer read GetExtraCharSpacing write SetExtraCharSpacing;
|
||||
property ExtraLineSpacing: integer read GetExtraLineSpacing write SetExtraLineSpacing;
|
||||
property ExtraCharSpacing: integer write SetExtraCharSpacing;
|
||||
property ExtraLineSpacing: integer write SetExtraLineSpacing;
|
||||
property VisibleSpecialChars: TSynVisibleSpecialChars write SetVisibleSpecialChars;
|
||||
property RightEdgeColumn: integer write SetRightEdgeColumn;
|
||||
property RightEdgeVisible: boolean write SetRightEdgeVisible;
|
||||
@ -1137,16 +1135,6 @@ begin
|
||||
FRightGutterArea.Paint(ACanvas, AClip);
|
||||
end;
|
||||
|
||||
function TLazSynSurfaceManager.GetExtraCharSpacing: integer;
|
||||
begin
|
||||
Result := FTextArea.ExtraCharSpacing;
|
||||
end;
|
||||
|
||||
function TLazSynSurfaceManager.GetExtraLineSpacing: integer;
|
||||
begin
|
||||
Result := FTextArea.ExtraLineSpacing;
|
||||
end;
|
||||
|
||||
procedure TLazSynSurfaceManager.DoDisplayViewChanged;
|
||||
begin
|
||||
FLeftGutterArea.DisplayView := DisplayView;
|
||||
|
@ -803,8 +803,6 @@ type
|
||||
procedure SetMouseSelActions(const AValue: TSynEditMouseActions); override;
|
||||
procedure SetMouseTextActions(AValue: TSynEditMouseActions); override;
|
||||
|
||||
function GetExtraCharSpacing: integer; override;
|
||||
function GetExtraLineSpacing: integer; override;
|
||||
procedure SetExtraCharSpacing(const Value: integer); override;
|
||||
procedure SetExtraLineSpacing(const Value: integer); override;
|
||||
|
||||
@ -1834,16 +1832,6 @@ begin
|
||||
Result := FBlockSelection.SelectionMode;
|
||||
end;
|
||||
|
||||
function TCustomSynEdit.GetExtraCharSpacing: integer;
|
||||
begin
|
||||
Result := FPaintArea.ExtraCharSpacing;
|
||||
end;
|
||||
|
||||
function TCustomSynEdit.GetExtraLineSpacing: integer;
|
||||
begin
|
||||
Result := FPaintArea.ExtraLineSpacing;
|
||||
end;
|
||||
|
||||
function TCustomSynEdit.GetFoldedCodeLineColor: TSynSelectedColor;
|
||||
begin
|
||||
Result := FFoldedLinesView.MarkupInfoFoldedCodeLine;
|
||||
@ -6658,6 +6646,7 @@ end;
|
||||
procedure TCustomSynEdit.SetExtraCharSpacing(const Value: integer);
|
||||
begin
|
||||
if ExtraCharSpacing=Value then exit;
|
||||
inherited;
|
||||
FPaintArea.ExtraCharSpacing := Value;
|
||||
FontChanged(self);
|
||||
end;
|
||||
@ -7762,6 +7751,7 @@ end;
|
||||
procedure TCustomSynEdit.SetExtraLineSpacing(const Value: integer);
|
||||
begin
|
||||
if ExtraLineSpacing=Value then exit;
|
||||
inherited;
|
||||
FPaintArea.ExtraLineSpacing := Value;
|
||||
FontChanged(self);
|
||||
end;
|
||||
|
@ -141,6 +141,8 @@ type
|
||||
fReadOnly: Boolean;
|
||||
fHideSelection: boolean;
|
||||
fBookMarkOpt: TSynBookMarkOpt;
|
||||
fExtraCharSpacing: integer;
|
||||
fExtraLineSpacing: integer;
|
||||
procedure BookMarkOptionsChanged(Sender: TObject);
|
||||
procedure SetHideSelection(Value: boolean);
|
||||
protected
|
||||
@ -203,10 +205,8 @@ type
|
||||
procedure SetMouseSelActions(const AValue: TSynEditMouseActions); virtual; abstract;
|
||||
procedure SetMouseTextActions(AValue: TSynEditMouseActions); virtual; abstract;
|
||||
|
||||
function GetExtraCharSpacing: integer; virtual; abstract;
|
||||
function GetExtraLineSpacing: integer; virtual; abstract;
|
||||
procedure SetExtraCharSpacing(const aExtraCharSpacing: integer); virtual; abstract;
|
||||
procedure SetExtraLineSpacing(const aExtraLineSpacing: integer); virtual; abstract;
|
||||
procedure SetExtraCharSpacing(const AValue: integer); virtual;
|
||||
procedure SetExtraLineSpacing(const AValue: integer); virtual;
|
||||
|
||||
function GetCaretX : Integer; virtual; abstract;
|
||||
function GetCaretY : Integer; virtual; abstract;
|
||||
@ -325,8 +325,8 @@ type
|
||||
function PhysicalLineLength(Line: String; Index: integer): integer; virtual; abstract;
|
||||
public
|
||||
property BookMarkOptions: TSynBookMarkOpt read fBookMarkOpt write fBookMarkOpt; // ToDo: check "write fBookMarkOpt"
|
||||
property ExtraCharSpacing: integer read GetExtraCharSpacing write SetExtraCharSpacing default 0;
|
||||
property ExtraLineSpacing: integer read GetExtraLineSpacing write SetExtraLineSpacing default 0;
|
||||
property ExtraCharSpacing: integer read fExtraCharSpacing write SetExtraCharSpacing default 0;
|
||||
property ExtraLineSpacing: integer read fExtraLineSpacing write SetExtraLineSpacing default 0;
|
||||
property Lines: TStrings read GetLines write SetLines;
|
||||
// See SYNEDIT_UNIMPLEMENTED_OPTIONS for deprecated Values
|
||||
property Options: TSynEditorOptions read FOptions write SetOptions default SYNEDIT_DEFAULT_OPTIONS;
|
||||
@ -914,6 +914,16 @@ begin
|
||||
Result := FBlockSelection.SelText;
|
||||
end;
|
||||
|
||||
procedure TSynEditBase.SetExtraCharSpacing(const AValue: integer);
|
||||
begin
|
||||
fExtraCharSpacing := AValue;
|
||||
end;
|
||||
|
||||
procedure TSynEditBase.SetExtraLineSpacing(const AValue: integer);
|
||||
begin
|
||||
fExtraLineSpacing := AValue;
|
||||
end;
|
||||
|
||||
procedure TSynEditBase.SetHideSelection(Value: boolean);
|
||||
begin
|
||||
if fHideSelection <> Value then begin
|
||||
|
Loading…
Reference in New Issue
Block a user