From d49bb2416bbcd8cc6703e59fda727dfa28435243 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 11 Feb 2014 18:13:47 -0800 Subject: [PATCH] Use subscribe instead of namespace --- src/cursor-view.coffee | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/cursor-view.coffee b/src/cursor-view.coffee index 48c826a0f..25258cda8 100644 --- a/src/cursor-view.coffee +++ b/src/cursor-view.coffee @@ -29,22 +29,21 @@ class CursorView extends View shouldPauseBlinking: false initialize: (@cursor, @editorView) -> - @cursor.on 'moved.cursor-view', => + @subscribe @cursor, 'moved', => @needsUpdate = true @shouldPauseBlinking = true - @cursor.on 'visibility-changed.cursor-view', (visible) => + @subscribe @cursor, 'visibility-changed', (visible) => @needsUpdate = true - @cursor.on 'autoscrolled.cursor-view', => + @subscribe @cursor, 'autoscrolled', => @editorView.requestDisplayUpdate() - @cursor.on 'destroyed.cursor-view', => + @subscribe @cursor, 'destroyed', => @needsRemoval = true beforeRemove: -> @editorView.removeCursorView(this) - @cursor.off('.cursor-view') @stopBlinking() updateDisplay: ->