 
 settings = require './settings'
 swrap = require './selection-wrapper'
+
+lineHeight = null
 
 getDomNode = (editorElement, cursor) ->
   cursorsComponent = editorElement.component.linesComponent.cursorsComponent

        left = 0
        unless selection.isReversed()
          if cursor.isAtBeginningOfLine()
            top = -RowHeightInEm
          else
            # This is very special case when very last line is not end with newline("\n")
            left -= cursor.getBufferColumn()

class CursorStyleManager
  constructor: (@vimState) ->
    {@editorElement, @editor} = @vimState
    @lineHeightObserver = atom.config.observe 'editor.lineHeight', (newValue) =>
      lineHeight = newValue
      @refresh()

  destroy: ->
    @subscriptions.dispose()
    @lineHeightObserver.dispose()
    {@subscriptions, @lineHeightObserver} = {}

  refresh: ->
    @subscriptions?.dispose()
    @subscriptions = new CompositeDisposable
    return unless (@vimState.isMode('visual') and settings.get('showCursorInVisualMode'))

