From d5b1146b9ba2dee81e2fa753f8ac1d1f8ef2aadf Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Mon, 1 Oct 2012 10:32:30 -0700 Subject: [PATCH] Only call gutter.afterAttach once --- src/app/gutter.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/gutter.coffee b/src/app/gutter.coffee index ef6f744e0..d8668be3c 100644 --- a/src/app/gutter.coffee +++ b/src/app/gutter.coffee @@ -13,8 +13,10 @@ class Gutter extends View highestNumberWidth: null afterAttach: (onDom) -> + return if @attached or not onDom + @attached = true @editor().on 'cursor-move', => @highlightCursorLine() - @calculateWidth() if onDom + @calculateWidth() editor: -> @parentView