From e0aa49cb53d9eb508cb9759e116c7683991b52f2 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Sun, 10 Jun 2012 21:43:24 -0600 Subject: [PATCH] More CompositeCursor :lipstick:. Preparing to axe it --- src/app/composite-cursor.coffee | 8 ++------ src/app/cursor-view.coffee | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/app/composite-cursor.coffee b/src/app/composite-cursor.coffee index 7df613280..1ba2f3da1 100644 --- a/src/app/composite-cursor.coffee +++ b/src/app/composite-cursor.coffee @@ -19,15 +19,11 @@ class CompositeCursor @editor.renderedLines.append(cursor) cursor - viewForCursor: (cursor) -> - for view in @getCursors() - return view if view.cursor == cursor + removeCursorView: (cursorView) -> + _.remove(@cursors, cursorView) removeAllCursorViews: -> cursor.remove() for cursor in @getCursorViews() - removeCursor: (cursor) -> - _.remove(@cursors, cursor) - updateAppearance: -> cursor.updateAppearance() for cursor in @cursors diff --git a/src/app/cursor-view.coffee b/src/app/cursor-view.coffee index f57fffd96..7210dac62 100644 --- a/src/app/cursor-view.coffee +++ b/src/app/cursor-view.coffee @@ -28,7 +28,7 @@ class CursorView extends View @editor.syncCursorAnimations() remove: -> - @editor.compositeCursor.removeCursor(this) + @editor.compositeCursor.removeCursorView(this) @cursor.off() super