mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 10:50:53 +02:00
SynEdit: PascalBeautifier, fix continue-string-on-next-line. The new "custom words" in string can break up the token, which stopped the beautifier from finding the start of the string.
This commit is contained in:
parent
fdadec0c67
commit
079a0f8eb5
@ -407,6 +407,7 @@ begin
|
||||
FCacheLastHlTokenCol := -1;
|
||||
if (CurrentLines[AIndex] <> '') then begin
|
||||
FPasHighlighter.StartAtLineIndex(AIndex);
|
||||
FPasHighlighter.SetIsInNextToEOL;
|
||||
while not FPasHighlighter.GetEol do begin
|
||||
FCacheLastHlTokenKind := TtkTokenKind(FPasHighlighter.GetTokenKind);
|
||||
FCacheLastHlTokenCol := FPasHighlighter.GetTokenPos + 1;
|
||||
|
@ -980,6 +980,7 @@ type
|
||||
function GetTokenIsCommentEnd: Boolean;
|
||||
function IsKeyword(const AKeyword: string): boolean; override;
|
||||
procedure Next; override;
|
||||
procedure SetIsInNextToEOL; experimental; // scan without extra colors
|
||||
|
||||
procedure ResetRange; override;
|
||||
procedure SetLine(const NewValue: string; LineNumber: Integer); override;
|
||||
@ -5524,6 +5525,11 @@ begin
|
||||
//DebugLn('TSynPasSyn.Next Run=%2d TkPos=%2d %12s Tk="%s" -- TS=%s Rng=%s F=%s ()=%d', [Run, fTokenPos, dbgs(FTokenID), GetToken, dbgs(FTokenState), dbgs(fRange), dbgs(TopPascalCodeFoldBlockType), PasCodeFoldRange.BracketNestLevel]);
|
||||
end;
|
||||
|
||||
procedure TSynPasSyn.SetIsInNextToEOL;
|
||||
begin
|
||||
FIsInNextToEOL := True;
|
||||
end;
|
||||
|
||||
function TSynPasSyn.GetDefaultAttribute(Index: integer):
|
||||
TSynHighlighterAttributes;
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user