 
     # If there is already a focus, we
     # need to wrap some things up with it.
-    if @socketFocus? and @socketFocus isnt focus
+    if @textFocus? and @textFocus isnt focus
 
       # The first of these is an undo operation;
       # we need to add this text change to the undo stack.
       @addMicroUndoOperation 'CAPTURE_POINT'
-      @addMicroUndoOperation new TextChangeOperation @socketFocus, @oldFocusValue
+      @addMicroUndoOperation new TextChangeOperation @textFocus, @oldFocusValue
       @oldFocusValue = null
 
       # The second of these is a reparse attempt.

      @aceEditor.resize true

      @redrawMain noText: true

      @currentlyUsingBlocks = false; @currentlyAnimating = true


  
  getFontHeight = (family, size) ->
    metrics = fontMetrics family, size
    return metrics.descent - metrics.ascent

  # DEBUG CODE
