Search in sources :

Example 6 with FromTo

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;
}
Also used : Pos(net.codemirror.lib.Pos) FromTo(net.codemirror.lib.TextMarker.FromTo)

Aggregations

FromTo (net.codemirror.lib.TextMarker.FromTo)6 Pos (net.codemirror.lib.Pos)2 LineOnOtherInfo (com.google.gerrit.client.diff.LineMapper.LineOnOtherInfo)1 LineRegionInfo (com.google.gerrit.client.diff.UnifiedChunkManager.LineRegionInfo)1