fixed synedit not eoScollPastEOL

git-svn-id: trunk@8569 -
This commit is contained in:
mattias 2006-01-19 23:03:13 +00:00
parent fe9a9c9db9
commit 8e7fce284d

View File

@ -1057,7 +1057,7 @@ type
fEvent: THookedCommandEvent; fEvent: THookedCommandEvent;
fData: pointer; fData: pointer;
function Equals(AEvent: THookedCommandEvent): boolean; function Equals(AEvent: THookedCommandEvent): boolean;
{$IFDEF FPC} {$IFDEF SYN_LAZARUS}
public public
{$ENDIF} {$ENDIF}
constructor Create(AEvent: THookedCommandEvent; AData: pointer); constructor Create(AEvent: THookedCommandEvent; AData: pointer);
@ -9133,14 +9133,14 @@ begin
else begin else begin
// move to end of prev line // move to end of prev line
dec(NewCaret.Y); dec(NewCaret.Y);
s:=Lines[NewCaret.Y]; s:=Lines[NewCaret.Y-1];
PhysicalLineLen:=LogicalToPhysicalPos(Point(length(s)+1,NewCaret.Y)).X-1; PhysicalLineLen:=LogicalToPhysicalPos(Point(length(s)+1,NewCaret.Y)).X-1;
NewCaret.X:=PhysicalLineLen; NewCaret.X:=PhysicalLineLen+1;
end; end;
end else if not (eoScrollPastEol in fOptions) then begin end else if not (eoScrollPastEol in fOptions) then begin
s:=LineText; s:=LineText;
PhysicalLineLen:=LogicalToPhysicalPos(Point(length(s)+1,CaretY)).X-1; PhysicalLineLen:=LogicalToPhysicalPos(Point(length(s)+1,CaretY)).X-1;
if NewCaret.X>PhysicalLineLen then begin if NewCaret.X>PhysicalLineLen+1 then begin
// move to start of next line // move to start of next line
NewCaret.X:=1; NewCaret.X:=1;
inc(NewCaret.Y); inc(NewCaret.Y);