SynEdit: fix caret after certain block.SetText operations. Issue #14195

git-svn-id: trunk@20953 -
This commit is contained in:
martin 2009-07-25 16:54:51 +00:00
parent 34e2e7ad8d
commit f865263b5a

View File

@ -914,8 +914,8 @@ begin
BB.X := 1;
StartLineBytePos := BB; // deletes selection // calls selection changed
end;
FInternalCaret.LineBytePos := StartLineBytePos;
if (Value <> nil) and (Value[0] <> #0) then begin
FInternalCaret.LineBytePos := StartLineBytePos;
InsertText;
StartLineBytePos := FInternalCaret.LineBytePos; // reset selection
end;