Optimization: Use already-sanitized screen position arg when calculating buffer position

This commit is contained in:
Nathan Sobo
2012-04-10 17:32:09 -06:00
parent 7e1a6cb5b4
commit 877d9f6755

View File

@@ -47,7 +47,7 @@ class Anchor
assignBufferPosition = options.assignBufferPosition ? true
@screenPosition = @editor.clipScreenPosition(@screenPosition, options) if clip
@bufferPosition = @editor.bufferPositionForScreenPosition(position, options) if assignBufferPosition
@bufferPosition = @editor.bufferPositionForScreenPosition(@screenPosition, options) if assignBufferPosition
Object.freeze @screenPosition
Object.freeze @bufferPosition