LineInfo baseLineInfo =
lineFinder.findLine(Math.min(selection.baseLineNumber, document.getLastLineNumber()));
int baseColumn = LineUtils.rubberbandColumn(baseLineInfo.line(), selection.baseColumn);
final LineInfo cursorLineInfo =
lineFinder.findLine(Math.min(selection.cursorLineNumber, document.getLastLineNumber()));
int cursorColumn = LineUtils.rubberbandColumn(cursorLineInfo.line(), selection.cursorColumn);
editor.getSelection().setSelection(baseLineInfo, baseColumn, cursorLineInfo, cursorColumn);
// Defer to match editor's initially deferred scrolling