Source:
<code>Point getPointAtOffset(int offset) { int lineIndex = content.getLineAtOffset(offset); String line = content.getLine(lineIndex); int lineOffset = content.getOffsetAtLine(lineIndex); int offsetInLine = Math.max (0, offset - lineOffset); int lineLength = line.length(); if (lineIndex < content.getLineCount() - 1) { int endLineOffset = content.getOffsetAtLine(lineIndex + 1) - 1; if (lineLength < offsetInLine && offsetInLine <= endLineOffset) { offsetInLine = lineLength; } } Point point; TextLayout layout = renderer.getTextLayout(lineIndex); if (lineLength != 0 && offsetInLine <= lineLength) { if (offsetInLine == lineLength) { offsetInLine = layout.getPreviousOffset(offsetInLine, SWT.MOVEMENT_CLUSTER); point = layout.getLocation(offsetInLine, true); } else { switch (caretAlignment) { case OFFSET_LEADING: point = layout.getLocation(offsetInLine, false); break; case PREVIOUS_OFFSET_TRAILING: default: boolean lineBegin = offsetInLine == 0; if (wordWrap && !lineBegin && (offset != caretOffset || selection.x != selection.y)) { int[] offsets = layout.getLineOffsets(); for (int i : offsets) { if (i == offsetInLine) { lineBegin = true; break; } } } if (lineBegin) { point = layout.getLocation(offsetInLine, false); } else { offsetInLine = layout.getPreviousOffset(offsetInLine, SWT.MOVEMENT_CLUSTER); point = layout.getLocation(offsetInLine, true); } break; } } } else { point = new Point(layout.getIndent(), <START> 0); <END> } renderer.disposeTextLayout(layout); point.x += leftMargin - horizontalScrollOffset; point.y += getLinePixel(lineIndex); return point; }</code><technical_language>This 0 is is causing issue I described. If change this layout.getVerticalIndent(), fixes it. I tested this extensively safe me</technical_language>

Target:
Point getPointAtOffset(int offset) { int lineIndex = content.getLineAtOffset(offset); String line = content.getLine(lineIndex); int lineOffset = content.getOffsetAtLine(lineIndex); int offsetInLine = Math.max (0, offset - lineOffset); int lineLength = line.length(); if (lineIndex < content.getLineCount() - 1) { int endLineOffset = content.getOffsetAtLine(lineIndex + 1) - 1; if (lineLength < offsetInLine && offsetInLine <= endLineOffset) { offsetInLine = lineLength; } } Point point; TextLayout layout = renderer.getTextLayout(lineIndex); if (lineLength != 0 && offsetInLine <= lineLength) { if (offsetInLine == lineLength) { offsetInLine = layout.getPreviousOffset(offsetInLine, SWT.MOVEMENT_CLUSTER); point = layout.getLocation(offsetInLine, true); } else { switch (caretAlignment) { case OFFSET_LEADING: point = layout.getLocation(offsetInLine, false); break; case PREVIOUS_OFFSET_TRAILING: default: boolean lineBegin = offsetInLine == 0; if (wordWrap && !lineBegin && (offset != caretOffset || selection.x != selection.y)) { int[] offsets = layout.getLineOffsets(); for (int i : offsets) { if (i == offsetInLine) { lineBegin = true; break; } } } if (lineBegin) { point = layout.getLocation(offsetInLine, false); } else { offsetInLine = layout.getPreviousOffset(offsetInLine, SWT.MOVEMENT_CLUSTER); point = layout.getLocation(offsetInLine, true); } break; } } } else { point = new Point(layout.getIndent(), layout.getVerticalIndent()); } renderer.disposeTextLayout(layout); point.x += leftMargin - horizontalScrollOffset; point.y += getLinePixel(lineIndex); return point; }