From 877d9f6755f86a079e83142f8571304d7e1b421c Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 10 Apr 2012 17:32:09 -0600 Subject: [PATCH] Optimization: Use already-sanitized screen position arg when calculating buffer position --- src/app/anchor.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/anchor.coffee b/src/app/anchor.coffee index a6a236ff5..ab78f9a0d 100644 --- a/src/app/anchor.coffee +++ b/src/app/anchor.coffee @@ -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