This commit is contained in:
Nathan Sobo
2012-06-07 15:42:21 -06:00
parent 624cf3cbd3
commit 58c8117e4e

View File

@@ -41,6 +41,13 @@ class EditSession
scrollLeft: @getScrollLeft()
cursorScreenPosition: @getCursorScreenPosition().serialize()
isEqual: (other) ->
return false unless other instanceof EditSession
@buffer == other.buffer and
@scrollTop == other.getScrollTop() and
@scrollLeft == other.getScrollLeft() and
@getCursorScreenPosition().isEqual(other.getCursorScreenPosition())
getRenderer: -> @renderer
setScrollTop: (@scrollTop) ->
@@ -153,11 +160,4 @@ class EditSession
else
positions.push(position)
isEqual: (other) ->
return false unless other instanceof EditSession
@buffer == other.buffer and
@scrollTop == other.getScrollTop() and
@scrollLeft == other.getScrollLeft() and
@getCursorScreenPosition().isEqual(other.getCursorScreenPosition())
_.extend(EditSession.prototype, EventEmitter)