Permalink
Browse files

Fixed caret position after leaving snippet mode.

  • Loading branch information...
dgrunwald committed Nov 21, 2010
1 parent 83c01ee commit e1a9ec1c9b9c8abdc611b8e59eca1a679151e4e1
@@ -23,6 +23,7 @@ public override void Insert(InsertionContext context)
internal static void SetCaret(InsertionContext context)
{
TextAnchor pos = context.Document.CreateAnchor(context.InsertionPosition);
+ pos.MovementType = AnchorMovementType.BeforeInsertion;
pos.SurviveDeletion = true;
context.Deactivated += (sender, e) => {
if (e.Reason == DeactivateReason.ReturnPressed || e.Reason == DeactivateReason.NoActiveElements) {

0 comments on commit e1a9ec1

Please sign in to comment.