   catch
     itemErrored = true
 
-  positionCodeOverlay row
+  positionCodeOverlay()
   setCodeContextDisplay itemErrored, selectionRange
 
-window.addEventListener 'resize', -> positionCodeOverlay(lastSelectionRangeRow)
+window.addEventListener 'resize', -> positionCodeOverlay()
 
 document.documentElement.classList.add 'page-loaded'
 

editorSession.setUseSoftTabs true
editorSession.setUseWrapMode true

lastSelectionRangeRow = undefined

selection = editorSession.getSelection()
selection.on 'changeCursor', ->
  selectionRange = editor.getSelectionRange()

    overlayEl.style.display = 'none'
    propertyPathEl.style.display = 'none'

positionCodeOverlay = ->
  position = ->
    rowEl = editorEl.querySelector '.ace_content .ace_marker-layer .ace_active-line'
    if rowEl
      overlayEl.style.top = rowEl.offsetTop + 'px'

  position()
  setTimeout position, 50

setEditorOverlayContext = (item) ->
  item = path: 'default' if not item.path
  contextPath = simplifyArrayPaths item.path
  contextHTML = INSTALL_JSON_CONTEXT[contextPath]?(item) or ''
  setTimeout ->
    overlayEl.innerHTML = contextHTML

positionCodeOverlay 0
setEditorOverlayContext 'default'
