MG: fixed synedit uninitialized charsinwindow

git-svn-id: trunk@1588 -
This commit is contained in:
lazarus 2002-04-03 21:29:54 +00:00
parent 20321075df
commit 6f067c4c9d

View File

@ -6338,9 +6338,10 @@ procedure TCustomSynEdit.SizeOrFontChanged(bFont: boolean);
begin begin
if HandleAllocated then begin if HandleAllocated then begin
fCharsInWindow := Max(1,(ClientWidth - fGutterWidth - 2 fCharsInWindow := Max(1,(ClientWidth - fGutterWidth - 2
{$IFDEF SYN_LAZARUS}-ScrollBarWidth{$ENDIF}) div fCharWidth); {$IFDEF SYN_LAZARUS} - ScrollBarWidth{$ENDIF})
div fCharWidth);
fLinesInWindow := (ClientHeight {$IFDEF SYN_LAZARUS}-13{$ENDIF}) fLinesInWindow := (ClientHeight {$IFDEF SYN_LAZARUS}-13{$ENDIF})
div fTextHeight; div fTextHeight;
if bFont then begin if bFont then begin
if Gutter.ShowLineNumbers then if Gutter.ShowLineNumbers then
GutterChanged(Self) GutterChanged(Self)
@ -6601,6 +6602,9 @@ begin
{$ELSE} {$ELSE}
DragAcceptFiles(Handle, TRUE); DragAcceptFiles(Handle, TRUE);
{$ENDIF} {$ENDIF}
{$IFDEF SYN_LAZARUS}
SizeOrFontChanged(true);
{$ENDIF}
end; end;
procedure TCustomSynEdit.DestroyWnd; procedure TCustomSynEdit.DestroyWnd;