using setRange seems to be simpler
 
```js
        var isBackwards = editor.selection.isBackwards();
        var range = editor.selection.getRange();
        range.start.column = range.end.column = 0;
        range.end.row += 1;
        editor.selection.setRange(range, isBackwards);
```