mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 14:49:29 +02:00
SynEdit Highlighter: Fix some highlighter could crash (e.g SQL with trailing spaces). They used a pointer to the text, but the text was in a temp location.. Issue #13263
git-svn-id: trunk@19158 -
This commit is contained in:
parent
26c62d75eb
commit
eff2d6991a
@ -163,13 +163,12 @@ type
|
||||
private
|
||||
fAttributes: TStringList;
|
||||
fAttrChangeHooks: TSynNotifyEventChain;
|
||||
{$IFDEF SYN_LAZARUS}
|
||||
FCapabilities: TSynHighlighterCapabilities;
|
||||
FCurrentLines: TSynEditStrings;
|
||||
FCurrentRanges: TSynHighlighterRangeList;
|
||||
FDrawDividerLevel: Integer;
|
||||
FLineIndex: Integer;
|
||||
{$ENDIF}
|
||||
FLineText: String;
|
||||
fUpdateCount: integer; //mh 2001-09-13
|
||||
fEnabled: Boolean;
|
||||
fWordBreakChars: TSynIdentChars;
|
||||
@ -1103,7 +1102,9 @@ begin
|
||||
ResetRange
|
||||
else
|
||||
SetRange(FCurrentRanges[LineNumber - 1]);
|
||||
SetLine(CurrentLines[LineNumber], LineNumber);
|
||||
// Keep a copy of the line text, since some highlighters just use a PChar pointer to it.
|
||||
FLineText := CurrentLines[LineNumber];
|
||||
SetLine(FLineText, LineNumber);
|
||||
end;
|
||||
|
||||
procedure TSynCustomHighlighter.ResetRange;
|
||||
|
Loading…
Reference in New Issue
Block a user