themes/default/public/scripts/ghostdown.js
function(pos) {
      if (posLess(pos, change.from)) return pos;
      if (!posLess(change.to, pos)) return end;

      var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;
      if (pos.line == change.to.line) ch += end.ch - change.to.ch;
      return Pos(line, ch);
    }
function(pos) {
      if (posLess(pos, change.from)) return pos;
      if (!posLess(change.to, pos)) return end;

      var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;
      if (pos.line == change.to.line) ch += end.ch - change.to.ch;
      return Pos(line, ch);
    }
function ( pos ) { if ( posLess ( pos , change . from ) ) return pos ; if ( ! posLess ( change . to , pos ) ) return end ; var line = pos . line + change . text . length - ( change . to . line - change . from . line ) - 1 , ch = pos . ch ; if ( pos . line == change . to . line ) ch += end . ch - change . to . ch ; return Pos ( line , ch ) ; }
hint is null, leave the selection alone as much as possible
hint is null leave the selection alone as much as possible