SynEdit: fixed wrong clipped caret (works in trunk due to refactor) Issue #0028019

git-svn-id: branches/fixes_1_4@49089 -
This commit is contained in:
martin 2015-05-18 20:27:02 +00:00
parent 792f116a9f
commit a8cb48d453

View File

@ -361,7 +361,7 @@ type
FCustomOffsetX, FCustomOffsetY: Array [TSynCaretType] of Integer;
FCurrentPosX, FCurrentPosY: Integer;
FCurrentVisible, FCurrentCreated: Boolean;
FCurrentClippedWidth: Integer;
FCurrentClippedWidth, FCurrentClippedHeight: Integer;
FLockCount: Integer;
FLockFlags: TSynCaretLockFlags;
procedure SetClipBottom(const AValue: Integer);
@ -2236,6 +2236,7 @@ begin
FCurrentPosX := -1;
FCurrentPosY := -1;
FCurrentClippedWidth := -1;
FCurrentClippedHeight := -1;
FClipExtraPixel := 0;
FLockCount := 0;
end;
@ -2522,7 +2523,7 @@ begin
exit;
end;
if (not FCurrentCreated) or (FCurrentClippedWidth <> w) then begin
if (not FCurrentCreated) or (FCurrentClippedWidth <> w) or (FCurrentClippedHeight <> h) then begin
{$IFDeF SynCaretDebug}
debugln(['SynEditCaret CreateCaret for HandleOwner=',FHandleOwner, ' DebugShowCount=', FDebugShowCount, ' Width=', w, ' pref-width=', FPixelWidth, ' Height=', FPixelHeight, ' FCurrentCreated=',FCurrentCreated, ' FCurrentVisible=',FCurrentVisible]);
FDebugShowCount := 0;
@ -2534,6 +2535,7 @@ begin
FCurrentCreated := True;
FCurrentVisible := False;
FCurrentClippedWidth := w;
FCurrentClippedHeight := h;
FCurrentPosX := x - 1;
SetCaretRespondToFocus(Handle, False); // Only for GTK
end;