       @refresh()
 
   destroy: ->
-    @subscriptions.dispose()
+    @subscriptions?.dispose()
     @lineHeightObserver.dispose()
     {@subscriptions, @lineHeightObserver} = {}
 
   refresh: ->
+    return if isSpecMode
     {submode} = @vimState
     @subscriptions?.dispose()
     @subscriptions = new CompositeDisposable


settings = require './settings'
swrap = require './selection-wrapper'

lineHeight = null

getDomNode = (editorElement, cursor) ->
  cursorsComponent = editorElement.component.linesComponent.cursorsComponent
  cursorsComponent.cursorNodesById[cursor.id]

# Return cursor style offset(top, left)
# ---------------------------------------
getOffset = (submode, selection) ->
  {top, left} = {}
  {cursor, editor} = selection
  switch submode
    when 'characterwise', 'blockwise'
      unless selection.isReversed()

        left += bufferPoint.column
  {top, left}

setStyle = (style, {top, left}) ->
  style.setProperty('top', "#{top}em") if top?
  style.setProperty('left', "#{left}ch") if left?
  new Disposable ->
    style.removeProperty('top')
    style.removeProperty('left')
