mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 22:58:50 +02:00
SynEdit clean up
git-svn-id: trunk@34941 -
This commit is contained in:
parent
b9adcfa385
commit
1fc2e095ea
@ -557,7 +557,6 @@ function TSynLogicalPhysicalConvertor.LogicalToPhysical(AIndex, ABytePos: Intege
|
||||
var AColOffset: Integer): Integer;
|
||||
var
|
||||
i: integer;
|
||||
CharWidths: TPhysicalCharWidths;
|
||||
begin
|
||||
{$IFDEF AssertSynMemIndex}
|
||||
if (ABytePos <= 0) then
|
||||
|
@ -876,12 +876,12 @@ type
|
||||
procedure ExecuteCommand(Command: TSynEditorCommand;
|
||||
const AChar: TUTF8Char; Data: pointer); virtual;
|
||||
|
||||
function GetHighlighterAttriAtRowCol(XY: TPoint; var Token: string;
|
||||
var Attri: TSynHighlighterAttributes): boolean;
|
||||
function GetHighlighterAttriAtRowColEx(XY: TPoint; var Token: string;
|
||||
var TokenType, Start: Integer;
|
||||
var Attri: TSynHighlighterAttributes): boolean; //L505
|
||||
procedure GetWordBoundsAtRowCol(const XY: TPoint; var StartX, EndX: integer);
|
||||
function GetHighlighterAttriAtRowCol(XY: TPoint; out Token: string;
|
||||
out Attri: TSynHighlighterAttributes): boolean;
|
||||
function GetHighlighterAttriAtRowColEx(XY: TPoint; out Token: string;
|
||||
out TokenType, Start: Integer;
|
||||
out Attri: TSynHighlighterAttributes): boolean; //L505
|
||||
procedure GetWordBoundsAtRowCol(const XY: TPoint; out StartX, EndX: integer);
|
||||
function GetWordAtRowCol(XY: TPoint): string;
|
||||
function NextTokenPos: TPoint; virtual; deprecated; // use next word pos instead
|
||||
function NextWordPos: TPoint; virtual;
|
||||
@ -2149,7 +2149,7 @@ end;
|
||||
|
||||
destructor TCustomSynEdit.Destroy;
|
||||
var
|
||||
q,i: integer;
|
||||
i: integer;
|
||||
begin
|
||||
Application.RemoveOnIdleHandler(@IdleScanRanges);
|
||||
SurrenderPrimarySelection;
|
||||
@ -7015,7 +7015,7 @@ end;
|
||||
procedure TCustomSynEdit.MoveCaretHorz(DX: integer);
|
||||
var
|
||||
NewCaret: TPoint;
|
||||
s, a: String;
|
||||
s: String;
|
||||
PhysicalLineLen: Integer;
|
||||
begin
|
||||
NewCaret:=Point(CaretX+DX,CaretY);
|
||||
@ -7934,7 +7934,7 @@ end;
|
||||
|
||||
//L505 begin
|
||||
function TCustomSynEdit.GetHighlighterAttriAtRowCol(XY: TPoint;
|
||||
var Token: string; var Attri: TSynHighlighterAttributes): boolean;
|
||||
out Token: string; out Attri: TSynHighlighterAttributes): boolean;
|
||||
var
|
||||
TmpType, TmpStart: Integer;
|
||||
begin
|
||||
@ -7942,8 +7942,8 @@ begin
|
||||
end;
|
||||
|
||||
function TCustomSynEdit.GetHighlighterAttriAtRowColEx(XY: TPoint;
|
||||
var Token: string; var TokenType, Start: Integer;
|
||||
var Attri: TSynHighlighterAttributes): boolean;
|
||||
out Token: string; out TokenType, Start: Integer;
|
||||
out Attri: TSynHighlighterAttributes): boolean;
|
||||
var
|
||||
PosX, PosY: integer;
|
||||
Line: string;
|
||||
@ -7985,7 +7985,7 @@ begin
|
||||
Result:=(length(c)=1) and (c[1] in IdentChars);
|
||||
end;
|
||||
|
||||
procedure TCustomSynEdit.GetWordBoundsAtRowCol(const XY: TPoint; var StartX,
|
||||
procedure TCustomSynEdit.GetWordBoundsAtRowCol(const XY: TPoint; out StartX,
|
||||
EndX: integer); // all params are logical (byte) positions
|
||||
var
|
||||
Line: string;
|
||||
|
@ -162,7 +162,7 @@ type
|
||||
{$ENDIF}
|
||||
{ Returns a string that has all the invalid chars of the output format
|
||||
replaced with the entries in the replacement array. }
|
||||
function ReplaceReservedChars(AToken: string; var IsSpace: boolean): string;
|
||||
function ReplaceReservedChars(AToken: string; out IsSpace: boolean): string;
|
||||
{ Sets the token attribute of the next token to determine the changes
|
||||
of colors and font styles so the properties of the next token can be
|
||||
added to the output buffer. }
|
||||
@ -447,7 +447,7 @@ end;
|
||||
{$ENDIF}
|
||||
|
||||
function TSynCustomExporter.ReplaceReservedChars(AToken: string;
|
||||
var IsSpace: boolean): string;
|
||||
out IsSpace: boolean): string;
|
||||
var
|
||||
I, ISrc, IDest, SrcLen, DestLen: integer;
|
||||
Replace: string;
|
||||
|
@ -2885,7 +2885,6 @@ end;
|
||||
function TSynEditFoldProvider.InfoForFoldAtTextIndex(ALine, AFoldIndex: Integer;
|
||||
HideLen: Boolean; NeedLen: Boolean = True): TSynEditFoldProviderNodeInfo;
|
||||
var
|
||||
c: LongInt;
|
||||
nd: TSynFoldNodeInfo;
|
||||
begin
|
||||
Result.LineCount := 0;
|
||||
@ -3900,11 +3899,10 @@ var
|
||||
end;
|
||||
|
||||
var
|
||||
FldSrcLine, FldSrcIndex, FLdNodeLine, FldLen, FndLen, FldCol: Integer;
|
||||
FldSrcLine, FldSrcIndex, FLdNodeLine, FldLen, FndLen: Integer;
|
||||
i, j, CurLen: Integer;
|
||||
PrevFldSrcLine: Integer;
|
||||
SubTree: TSynTextFoldAVLTree;
|
||||
IsHide: Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
FldSrcLine := doStart;
|
||||
|
@ -54,7 +54,6 @@ type
|
||||
private
|
||||
FFileLineEndType: TSynLinesFileLineEndType;
|
||||
FFileWriteLineEndType: TSynLinesFileLineEndType;
|
||||
FLineEndType: TSynLinesFileLineEndType;
|
||||
FTextBuffer: TSynEditStringList;
|
||||
FOnSaved: TSavedNotification;
|
||||
function GetTextChangeStamp: int64;
|
||||
|
@ -1453,8 +1453,6 @@ procedure TSynEditSelection.SetEndLineBytePos(Value : TPoint);
|
||||
var
|
||||
s: string;
|
||||
{$ENDIF}
|
||||
var
|
||||
WasAvail: Boolean;
|
||||
begin
|
||||
if FEnabled then begin
|
||||
Value.y := MinMax(Value.y, 1, fLines.Count);
|
||||
@ -1477,7 +1475,6 @@ begin
|
||||
{$ENDIF}
|
||||
|
||||
if (Value.X <> FEndBytePos) or (Value.Y <> FEndLinePos) then begin
|
||||
WasAvail := SelAvail;
|
||||
if (ActiveSelectionMode = smColumn) and (Value.X <> FEndBytePos) then
|
||||
FInvalidateLinesMethod(Min(FStartLinePos, Min(FEndLinePos, Value.Y)),
|
||||
Max(FStartLinePos, Max(FEndLinePos, Value.Y)))
|
||||
|
@ -572,8 +572,6 @@ var
|
||||
rcNode: TRect;
|
||||
ptCenter : TPoint;
|
||||
isPrevLine: Boolean;
|
||||
i: Integer;
|
||||
HasExHl: Boolean;
|
||||
DrawOpts: TDrawNodeSymbolOptions;
|
||||
begin
|
||||
isPrevLine := IsFoldHidePreviousLine(iLine);
|
||||
@ -624,7 +622,6 @@ var
|
||||
then
|
||||
Canvas.Pen.Color := MarkupInfo.FrameColor;
|
||||
|
||||
i:= 0;
|
||||
if isPrevLine and (NodeType = cfCollapsedHide) then
|
||||
include(DrawOpts, nsoSubtype);
|
||||
DrawNodeSymbol(Canvas, rcNode, NodeType, DrawOpts);
|
||||
|
@ -306,7 +306,7 @@ type
|
||||
|
||||
function GetModifierStr : RegExprString;
|
||||
class function ParseModifiersStr (const AModifiers : RegExprString;
|
||||
var AModifiersInt : integer) : boolean; //###0.941 class function now
|
||||
out AModifiersInt : integer) : boolean; //###0.941 class function now
|
||||
// Parse AModifiers string and return true and set AModifiersInt
|
||||
// if it's in format 'ismxrg-ismxrg'.
|
||||
procedure SetModifierStr (const AModifiers : RegExprString);
|
||||
@ -340,7 +340,7 @@ type
|
||||
// insert an operator in front of already-emitted operand
|
||||
// Means relocating the operand.
|
||||
|
||||
function ParseReg (paren : integer; var flagp : integer) : PRegExprChar;
|
||||
function ParseReg (paren : integer; out flagp : integer) : PRegExprChar;
|
||||
// regular expression, i.e. main body or parenthesized thing
|
||||
|
||||
function ParseBranch (var flagp : integer) : PRegExprChar;
|
||||
@ -1328,7 +1328,7 @@ function TRegExpr.GetModifierStr : RegExprString;
|
||||
--------------------------------------------------------------}
|
||||
|
||||
class function TRegExpr.ParseModifiersStr (const AModifiers : RegExprString;
|
||||
var AModifiersInt : integer) : boolean;
|
||||
out AModifiersInt : integer) : boolean;
|
||||
// !!! Be carefull - this is class function and must not use object instance fields
|
||||
var
|
||||
i : integer;
|
||||
@ -1746,7 +1746,7 @@ function TRegExpr.CompileRegExpr (exp : PRegExprChar) : boolean;
|
||||
end; { of function TRegExpr.CompileRegExpr
|
||||
--------------------------------------------------------------}
|
||||
|
||||
function TRegExpr.ParseReg (paren : integer; var flagp : integer) : PRegExprChar;
|
||||
function TRegExpr.ParseReg (paren : integer; out flagp : integer) : PRegExprChar;
|
||||
// regular expression, i.e. main body or parenthesized thing
|
||||
// Caller must absorb opening parenthesis.
|
||||
// Combining parenthesis handling with the base level of regular expression
|
||||
|
Loading…
Reference in New Issue
Block a user