SynEdit: Fixed Caret when scrolling under older Wine (Win Emulator) 0021929

git-svn-id: trunk@37166 -
This commit is contained in:
martin 2012-05-05 18:10:28 +00:00
parent b16adcf533
commit d17e688df7
2 changed files with 8 additions and 0 deletions

View File

@ -4190,6 +4190,7 @@ begin
debugln(['ScrollAfterTopLineChanged did scroll Delta=',Delta]); debugln(['ScrollAfterTopLineChanged did scroll Delta=',Delta]);
{$ENDIF} {$ENDIF}
include(fStateFlags, sfHasScrolled); include(fStateFlags, sfHasScrolled);
FScreenCaret.InvalidatePos; // Wine (Win emulator) may have changed the pos with the scroll
end else begin end else begin
Invalidate; // scrollwindow failed, invalidate all Invalidate; // scrollwindow failed, invalidate all
{$IFDEF SYNSCROLLDEBUG} {$IFDEF SYNSCROLLDEBUG}

View File

@ -308,6 +308,7 @@ type
procedure DestroyCaret(SkipHide: boolean = False); procedure DestroyCaret(SkipHide: boolean = False);
procedure Lock; procedure Lock;
procedure UnLock; procedure UnLock;
procedure InvalidatePos;
property HandleOwner: TWinControl read FHandleOwner; property HandleOwner: TWinControl read FHandleOwner;
property CharWidth: Integer read FCharWidth write SetCharWidth; property CharWidth: Integer read FCharWidth write SetCharWidth;
property CharHeight: Integer read FCharHeight write SetCharHeight; property CharHeight: Integer read FCharHeight write SetCharHeight;
@ -1687,6 +1688,12 @@ begin
end; end;
end; end;
procedure TSynEditScreenCaret.InvalidatePos;
begin
FCurrentPosY := -1;
FCurrentPosX := -1;
end;
procedure TSynEditScreenCaret.SetClipRight(const AValue: Integer); procedure TSynEditScreenCaret.SetClipRight(const AValue: Integer);
begin begin
if FClipRight = AValue then exit; if FClipRight = AValue then exit;