Return whether both offset1 and offset2 are on the same line.
offset1
offset2
bool onSameLine(int offset1, int offset2) { return lineNumberDifference(offset1, offset2) == 0; }