 
   # CURSOR DRAW SUPPORRT
   # ================================
+  hook 'populate', 0, ->
+    @cursorCanvas = document.createElement 'canvas'
+    @cursorCanvas.className = 'ice-highlight-canvas'
+
+    @cursorCtx = @cursorCanvas.getContext '2d'
+
+    @iceElement.appendChild @cursorCanvas
+
+  hook 'resize', 0, ->
+    @cursorCanvas.width = @iceElement.offsetWidth
+    @cursorCanvas.style.width = "#{@cursorCanvas.width}px"
+
+    @cursorCanvas.height = @iceElement.offsetHeight
+    @cursorCanvas.style.height = "#{@cursorCanvas.height}px"
+
+    @cursorCanvas.style.left = "#{@mainCanvas.offsetLeft}px"
+
   Editor::strokeCursor = (point) ->
     return unless point?
-
-    @highlightCtx.beginPath()
-
-    @highlightCtx.fillStyle =
-      @highlightCtx.strokeStyle = '#000'
-
-    @highlightCtx.lineWidth = 1
-
-    if point.x >= 5
-      @highlightCtx.moveTo point.x, point.y
-      @highlightCtx.lineTo point.x - 5, point.y - 5
-      @highlightCtx.lineTo point.x - 5, point.y + 5
+    @cursorCtx.save()
+    @cursorCtx.beginPath()
+
+    @cursorCtx.fillStyle =
+      @cursorCtx.strokeStyle = '#000'
+
+    @cursorCtx.lineCap = 'round'
+
+    @cursorCtx.lineWidth = 3
+
+    w = @view.opts.tabWidth / 2 - CURSOR_WIDTH_DECREASE
+    h = @view.opts.tabHeight - CURSOR_HEIGHT_DECREASE
+
+    arcCenter = new @draw.Point point.x + @view.opts.tabOffset + w + CURSOR_WIDTH_DECREASE,
+      point.y - (w*w + h*h) / (2 * h) + h
+    arcAngle = Math.atan2 w, (w*w + h*h) / (2 * h) - h
+    startAngle = 0.5 * Math.PI - arcAngle
+    endAngle = 0.5 * Math.PI + arcAngle
+
+    @cursorCtx.arc arcCenter.x, arcCenter.y, (w*w + h*h) / (2 * h), startAngle, endAngle
+
+    @cursorCtx.stroke()
+    @cursorCtx.restore()
+
+  Editor::highlightFlashShow = ->
+    if @flashTimeout? then clearTimeout @flashTimeout
+    @cursorCanvas.style.display = 'block'
+    @highlightsCurrentlyShown = true
+    @flashTimeout = setTimeout (=> @flash()), 500
+
+  Editor::highlightFlashHide = ->
+    if @flashTimeout? then clearTimeout @flashTimeout
+    @cursorCanvas.style.display = 'none'
+    @highlightsCurrentlyShown = false
+    @flashTimeout = setTimeout (=> @flash()), 500
+
+  Editor::flash = ->
+    if @lassoSegment? or @draggingBlock? or
+        (@textFocus? and @textInputHighlighted) or
+        not @highlightsCurrentlyShown
+      @highlightFlashShow()
     else
-      @highlightCtx.moveTo point.x, point.y
-      @highlightCtx.lineTo point.x + 5, point.y - 5
-      @highlightCtx.lineTo point.x + 5, point.y + 5
-
-    @highlightCtx.stroke()
-    @highlightCtx.fill()
+      @highlightFlashHide()
+
+  hook 'populate', 0, ->
+    @highlightsCurrentlyShown = false
+
+    @flashTimeout = setTimeout (=> @flash()), 0
 
   # ONE MORE DROP CASE
   # ================================

      @paletteCtx.clearRect @scrollOffsets.palette.x, @scrollOffsets.palette.y,
        @paletteCanvas.width, @paletteCanvas.height


  Editor::redrawPalette = ->
      @clearPalette()

      # Supply our palette canvas for text measuring
      @draw.setCtx @paletteCtx

      @draw.setGlobalFontSize @fontSize

      # We will construct a vertical layout
      # with padding for the palette blocks.

      hitTestResult = @hitTestTextInput mainPoint, @tree

    if hitTestResult?
      unless hitTestResult is @textFocus
        @setTextInputFocus hitTestResult
        @redrawMain()
