6849232: closed/javax/swing/text/GlyphPainter2/6427244/bug6427244.java fails on RHEL5
Reviewed-by: peterz
This commit is contained in:
parent
a37d4170e2
commit
a54e99d9a7
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user