public/javascripts/codemirror/js/editor.js
function() {
      var cur = select.selectionTopNode(this.container, true), start = cur;
      if (cur === false || !(!cur || cur.isPart || isBR(cur)) || !this.container.firstChild)
        return false;

      while (cur && !isBR(cur)) cur = cur.previousSibling;
      var next = cur ? cur.nextSibling : this.container.firstChild;
      if (next && next != start && next.isPart && hasClass(next, "whitespace"))
        select.focusAfterNode(next, this.container);
      else
        select.focusAfterNode(cur, this.container);

      select.scrollToCursor(this.container);
      return true;
    }
function() {
      var cur = select.selectionTopNode(this.container, true), start = cur;
      if (cur === false || !(!cur || cur.isPart || isBR(cur)) || !this.container.firstChild)
        return false;

      while (cur && !isBR(cur)) cur = cur.previousSibling;
      var next = cur ? cur.nextSibling : this.container.firstChild;
      if (next && next != start && next.isPart && hasClass(next, "whitespace"))
        select.focusAfterNode(next, this.container);
      else
        select.focusAfterNode(cur, this.container);

      select.scrollToCursor(this.container);
      return true;
    }
function ( ) { var cur = select . selectionTopNode ( this . container , true ) , start = cur ; if ( cur === false || ! ( ! cur || cur . isPart || isBR ( cur ) ) || ! this . container . firstChild ) return false ; while ( cur && ! isBR ( cur ) ) cur = cur . previousSibling ; var next = cur ? cur . nextSibling : this . container . firstChild ; if ( next && next != start && next . isPart && hasClass ( next , "whitespace" ) ) select . focusAfterNode ( next , this . container ) ; else select . focusAfterNode ( cur , this . container ) ; select . scrollToCursor ( this . container ) ; return true ; }
Custom home behaviour that doesn't land the cursor in front of leading whitespace unless pressed twice.
Custom home behaviour that doesn t land the cursor in front of leading whitespace unless pressed twice .