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

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

positionCodeOverlay = (row) ->
  try
    rowEl = editorEl.querySelector ".ace_content .ace_text-layer .ace_line_group:nth-child(#{ row + 1 })"

    if parseInt(rowEl.style.height, 10) is 21
      overlayEl.style.top = rowEl.offsetTop + 'px'

    else
      setTimeout ->
        rowEl = editorEl.querySelector ".ace_content .ace_marker-layer .ace_active-line"
        overlayEl.style.top = rowEl.offsetTop + 'px'
      , 50

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

positionCodeOverlay 0
setEditorOverlayContext 'default'

editorSession.setUseSoftTabs true
editorSession.setUseWrapMode true

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