internal void ApplyStashedCaretPosition() { var stashedCaretPosition = StashedCaret.GetPosition(Snapshot); if (!Selections.Any(s => s.Caret.GetPoint(Snapshot) == stashedCaretPosition)) { Selections.Add( new Selection { Start = null, End = null, Caret = StashedCaret, ColumnPosition = Snapshot.GetLineColumnFromPosition(stashedCaretPosition) } ); } StashedCaret = null; }
internal SnapshotPoint ApplyStashedCaretPosition() { var stashedCaretPosition = StashedCaret.GetPosition(Snapshot); var position = view.Caret.Position.BufferPosition; view.Caret.MoveTo(StashedCaret.GetPoint(Snapshot)); if (!Selections.Any(s => s.Caret.GetPoint(Snapshot) == stashedCaretPosition)) { Selections.Add( new Selection { Caret = StashedCaret, ColumnPosition = GetColumnPosition() } ); } StashedCaret = null; return(position); }