int (int masterVisualLine) { Editor master = getMaster(); Editor slave = getSlave(); int masterCenterLine = master.visualToLogicalPosition(new VisualPosition(masterVisualLine, 0)).line; Range range = myScrollable.getRange(mySide, masterCenterLine); int masterStart = logicalToVisualLine(master, range.start1); int masterEnd = range.start1 == range.end1 ? masterStart : logicalToVisualLine(master, range.end1); int slaveStart = logicalToVisualLine(slave, range.start2); int slaveEnd = range.start2 == range.end2 ? slaveStart : logicalToVisualLine(slave, range.end2); Range visualRange = new Range(masterStart, masterEnd, slaveStart, slaveEnd); return BaseSyncScrollable.transferLine(masterVisualLine, visualRange); }