use of net.codemirror.lib.TextMarker.FromTo in project gerrit by GerritCodeReview.
the class CommentManager method adjustSelection.
static FromTo adjustSelection(CodeMirror cm) {
FromTo fromTo = cm.getSelectedRange();
Pos to = fromTo.to();
if (to.ch() == 0) {
to.line(to.line() - 1);
to.ch(cm.getLine(to.line()).length());
}
return fromTo;
}
Aggregations