SynEdit: Adjust Selection in other view editor

git-svn-id: trunk@24519 -
This commit is contained in:
martin 2010-04-08 16:45:47 +00:00
parent 2446e9898d
commit 975ef069b2
2 changed files with 9 additions and 4 deletions

View File

@ -1732,6 +1732,7 @@ begin
// Paintlock increased by sharing editor
FStoredCaredAutoAdjust := FCaret.AutoMoveOnEdit;
FCaret.AutoMoveOnEdit := True;
FBlockSelection.IncPersistentLock;
end;
end;
inc(FPaintLock);
@ -1773,6 +1774,7 @@ begin
FBlockSelection.AutoExtend := False;
if FPaintLockOwner = 0 then begin
// Paintlock increased by sharing editor
FBlockSelection.DecPersistentLock;
FCaret.AutoMoveOnEdit := FStoredCaredAutoAdjust;
end;
end;

View File

@ -926,11 +926,14 @@ begin
AdjustStartLineBytePos(AdjustPoint(StartLineBytePos));
EndLineBytePos := AdjustPoint(EndLineBytePos);
end;
// Todo: Change Lines in smColumn
end
else // Change the Selection, if change was made by owning SynEdit (Caret.Locked)
// (InternalSelection has no Caret)
if (FCaret <> nil) and (FCaret.Locked) then
StartLineBytePos := FCaret.LineBytePos;
else begin
// Change the Selection, if change was made by owning SynEdit (Caret.Locked)
// (InternalSelection has no Caret)
if (FCaret <> nil) and (FCaret.Locked) then
StartLineBytePos := FCaret.LineBytePos;
end;
end;
procedure TSynEditSelection.SetSelTextPrimitive(PasteMode : TSynSelectionMode;