     @lockDefaultCode true
     @recompile cast
     Backbone.Mediator.publish 'tome:spell-loaded', spell: @spell
+    @hasSetInitialCursor = false
+    @highlightCurrentLine()
     @updateLines()
 
   recompile: (cast=true, realTime=false, cinematic=false) ->

      # Expand it to bottom of tome if too short.
      #newHeight = Math.max @spellPaletteHeight, tomeHeight - newTop + 10
      #spellPaletteView.css('height', newHeight) if @spellPaletteHeight isnt newHeight

  hideProblemAlert: ->
    return if @destroyed

          unless @hasSetInitialCursor
            @hasSetInitialCursor = true
            @ace.navigateTo index, line.match(/\S/)?.index ? line.length
            @firstEntryToScrollLine = index

        # Shift pointer right based on current indentation
        # TODO: tabs probably need different horizontal offsets than spaces
