@@ -337,7 +337,7 @@ TScintEdit = class(TWinControl)
337
337
write SetAutoCompleteFontName;
338
338
property AutoCompleteFontSize: Integer read FAutoCompleteFontSize
339
339
write SetAutoCompleteFontSize default 0 ;
340
- property ChangeHistory: Boolean read FChangeHistory write SetChangeHistory;
340
+ property ChangeHistory: Boolean read FChangeHistory write SetChangeHistory default False ;
341
341
property CodePage: Integer read FCodePage write SetCodePage default CP_UTF8;
342
342
property Color;
343
343
property FillSelectionToEdge: Boolean read FFillSelectionToEdge write SetFillSelectionToEdge
@@ -1298,14 +1298,13 @@ function TScintEdit.ReplaceTextRange(const StartPos, EndPos: Integer;
1298
1298
end ;
1299
1299
1300
1300
procedure TScintEdit.RestyleLine (const Line: Integer);
1301
- var
1302
- StartPos, EndPos, EndStyledPos: Integer;
1303
1301
begin
1304
- StartPos := GetPositionFromLine(Line);
1305
- EndPos := GetPositionFromLine(Line + 1 );
1306
- { Back up the 'last styled position' if necessary }
1307
- EndStyledPos := Call(SCI_GETENDSTYLED, 0 , 0 );
1308
- if StartPos < EndStyledPos then
1302
+ var StartPos := GetPositionFromLine(Line);
1303
+ var EndPos := GetPositionFromLine(Line + 1 );
1304
+ { Back up the 'last styled position' if necessary using SCI_STARTSTYLINE
1305
+ (SCI_SETENDSTYLED would have been a clearer name because setting the
1306
+ 'last styled position' is all it does }
1307
+ if StartPos < Call(SCI_GETENDSTYLED, 0 , 0 ) then
1309
1308
Call(SCI_STARTSTYLING, StartPos, 0 );
1310
1309
StyleNeeded(EndPos);
1311
1310
end ;
0 commit comments