           screenRows.indexOf(screenPoint.row)
         else
           -(screenRows.reverse().indexOf(screenPoint.row) + 1)
-        top = rows * RowHeightInEm
+        top = rows * lineHeight
         left = screenPoint.column
       else
         # In linwise selection, cursor isAtBeginningOfLine of next row of selected row.

class CursorStyleManager
  constructor: (@vimState) ->
    {@editorElement, @editor} = @vimState
    @subscriptions = new CompositeDisposable

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

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


getOffset = (submode, selection) ->
  {top, left} = {}
  {cursor} = selection
  switch submode
    when 'characterwise', 'blockwise'
      unless selection.isReversed()
        if cursor.isAtBeginningOfLine()
          top = -lineHeight
        else
          left = -1
    when 'linewise'
