提交 eb24b6a5 编写于 作者: R rupashka

6849232: closed/javax/swing/text/GlyphPainter2/6427244/bug6427244.java fails on RHEL5

Reviewed-by: peterz
上级 1f711967
......@@ -172,6 +172,11 @@ class GlyphPainter2 extends GlyphView.GlyphPainter {
//italic carets and we do not.
TextHitInfo hit = layout.hitTestChar(x - (float)alloc.getX(), 0);
int pos = hit.getInsertionIndex();
if (pos == v.getEndOffset()) {
pos--;
}
biasReturn[0] = hit.isLeadingEdge() ? Position.Bias.Forward : Position.Bias.Backward;
return pos + v.getStartOffset();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册