CaretImpl () { updateCachedStateIfNeeded(); CaretImpl clone = new CaretImpl(myEditor, myCaretModel); clone.myLogicalCaret = myLogicalCaret; clone.myVerticalInfo = myVerticalInfo; clone.myVisibleCaret = myVisibleCaret; clone.myPositionMarker.dispose(); clone.myPositionMarker = new PositionMarker(getOffset()); clone.myLeansTowardsLargerOffsets = myLeansTowardsLargerOffsets; clone.myLogicalColumnAdjustment = myLogicalColumnAdjustment; clone.myVisualColumnAdjustment = myVisualColumnAdjustment; clone.myVisualLineStart = myVisualLineStart; clone.myVisualLineEnd = myVisualLineEnd; clone.mySkipChangeRequests = mySkipChangeRequests; clone.myDesiredX = myDesiredX; return clone; }