stickshift.js
function drawSelectionCursor(cm, range, output) {
    var pos = cursorCoords(cm, range.head, "div", null, null, !cm.options.singleCursorHeightPerLine);

    var cursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor"));
    cursor.style.left = pos.left + "px";
    cursor.style.top = pos.top + "px";
    cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px";

    if (pos.other) {
      // Secondary cursor, shown when on a 'jump' in bi-directional text
      var otherCursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor"));
      otherCursor.style.display = "";
      otherCursor.style.left = pos.other.left + "px";
      otherCursor.style.top = pos.other.top + "px";
      otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px";
    }
  }
function drawSelectionCursor(cm, range, output) {
    var pos = cursorCoords(cm, range.head, "div", null, null, !cm.options.singleCursorHeightPerLine);

    var cursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor"));
    cursor.style.left = pos.left + "px";
    cursor.style.top = pos.top + "px";
    cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px";

    if (pos.other) {
      // Secondary cursor, shown when on a 'jump' in bi-directional text
      var otherCursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor"));
      otherCursor.style.display = "";
      otherCursor.style.left = pos.other.left + "px";
      otherCursor.style.top = pos.other.top + "px";
      otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px";
    }
  }
function drawSelectionCursor ( cm , range , output ) { var pos = cursorCoords ( cm , range . head , "div" , null , null , ! cm . options . singleCursorHeightPerLine ) ; var cursor = output . appendChild ( elt ( "div" , "\u00a0" , "CodeMirror-cursor" ) ) ; cursor . style . left = pos . left + "px" ; cursor . style . top = pos . top + "px" ; cursor . style . height = Math . max ( 0 , pos . bottom - pos . top ) * cm . options . cursorHeight + "px" ; if ( pos . other ) { // Secondary cursor, shown when on a 'jump' in bi-directional text var otherCursor = output . appendChild ( elt ( "div" , "\u00a0" , "CodeMirror-cursor CodeMirror-secondarycursor" ) ) ; otherCursor . style . display = "" ; otherCursor . style . left = pos . other . left + "px" ; otherCursor . style . top = pos . other . top + "px" ; otherCursor . style . height = ( pos . other . bottom - pos . other . top ) * .85 + "px" ; } }
Draws a cursor for the given range
Draws a cursor for the given range