IDE: do not position caret in last screen column on error-jump

git-svn-id: trunk@28025 -
This commit is contained in:
martin 2010-11-01 12:49:12 +00:00
parent 493e7f67a5
commit 2394118eb9

View File

@ -12849,7 +12849,7 @@ begin
SrcEdit.EditorComponent.LogicalCaretXY:=LogCaretXY;
SrcEdit.EditorComponent.TopLine:=TopLine;
with SrcEdit.EditorComponent do begin
LeftChar:=Max(LogCaretXY.X-CharsInWindow,1);
LeftChar:=Max(LogCaretXY.X - (CharsInWindow * 4 div 5),1);
end;
SrcEdit.ErrorLine:=LogCaretXY.Y;
end;
@ -12959,7 +12959,7 @@ begin
if not SrcEdit.IsLocked then
SrcEdit.CenterCursor(True);
with SrcEdit.EditorComponent do begin
LeftChar:= Math.Max(LogCaretXY.X-CharsInWindow,1);
LeftChar:= Math.Max(LogCaretXY.X - (CharsInWindow * 4 div 5),1);
end;
finally
SrcEdit.EndUpdate;
@ -14161,7 +14161,7 @@ begin
end;
//DebugLn('TMainIDE.DoJumpToCodePos NewY=',dbgs(NewY),' ',dbgs(TopLine),' ',dbgs(NewTopLine));
with NewSrcEdit.EditorComponent do
LeftChar:=Max(NewX - CharsInWindow, 1);
LeftChar:=Max(NewX - (CharsInWindow * 4 div 5), 1);
finally
NewSrcEdit.EndUpdate;
end;