Merge overlapping spans while leaving the renderer cursor unchanged - Code review | OneNoughtOne