reduced updates on cursor up/down

git-svn-id: trunk@4381 -
This commit is contained in:
mattias 2003-07-07 19:21:13 +00:00
parent 8db6d830ec
commit 65d18dc437

View File

@ -684,6 +684,7 @@ type
property TopLine: Integer read fTopLine write SetTopLine; property TopLine: Integer read fTopLine write SetTopLine;
{$IFDEF SYN_LAZARUS} {$IFDEF SYN_LAZARUS}
procedure Update; override; procedure Update; override;
procedure Invalidate; override;
{$ENDIF} {$ENDIF}
public public
property OnKeyDown; property OnKeyDown;
@ -3204,6 +3205,12 @@ begin
{$ENDIF} {$ENDIF}
end; end;
procedure TCustomSynEdit.Invalidate;
begin
//writeln('TCustomSynEdit.Invalidate A');
inherited Invalidate;
end;
procedure TCustomSynEdit.PasteFromClipboard; procedure TCustomSynEdit.PasteFromClipboard;
var var
StartOfBlock: TPoint; StartOfBlock: TPoint;
@ -5130,17 +5137,20 @@ begin
if (NewY<>fLastCtrlMouseLinkY) if (NewY<>fLastCtrlMouseLinkY)
or (NewX1<>fLastCtrlMouseLinkX1) or (NewX1<>fLastCtrlMouseLinkX1)
or (NewX2<>fLastCtrlMouseLinkX2) or (NewX2<>fLastCtrlMouseLinkX2)
then then begin
Invalidate; Invalidate;
end;
end else begin end else begin
// there is no link -> do not show link // there is no link -> do not show link
if fLastCtrlMouseLinkY>0 then if fLastCtrlMouseLinkY>0 then begin
Invalidate; Invalidate;
end;
end; end;
end else begin end else begin
// do not show link // do not show link
if fLastCtrlMouseLinkY>0 then if fLastCtrlMouseLinkY>0 then begin
Invalidate; Invalidate;
end;
end; end;
end; end;
{$ENDIF} {$ENDIF}
@ -5746,12 +5756,16 @@ begin
ecUp, ecSelUp: ecUp, ecSelUp:
begin begin
MoveCaretVert(-1, Command = ecSelUp); MoveCaretVert(-1, Command = ecSelUp);
{$IFNDEF SYN_LAZARUS}
Update; Update;
{$ENDIF}
end; end;
ecDown, ecSelDown: ecDown, ecSelDown:
begin begin
MoveCaretVert(1, Command = ecSelDown); MoveCaretVert(1, Command = ecSelDown);
{$IFNDEF SYN_LAZARUS}
Update; Update;
{$ENDIF}
end; end;
ecPageUp, ecSelPageUp, ecPageDown, ecSelPageDown: ecPageUp, ecSelPageUp, ecPageDown, ecSelPageDown:
begin begin