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

View File

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