### Eclipse Workspace Patch 1.0
#P org.sophie2.base.model.text
|
|
|
209 | 209 | */ |
210 | 210 | public HotPos getHitPos(ImmPoint point, boolean isLast) { |
211 | 211 | TextLayout awtLayout = toAwtLayout(); |
212 | | TextHitInfo hit = awtLayout.hitTestChar(point.getX(), point.getY()); |
| 212 | |
| 213 | float off = getOffset(this.text.getBegin(), awtLayout); |
| 214 | |
| 215 | TextHitInfo hit = awtLayout.hitTestChar(point.getX() - off, point.getY()); |
213 | 216 | HotPos hitPos = TextUtils.getPos(this.text, isLast ? hit.getInsertionIndex() : hit.getCharIndex()); |
214 | 217 | if (hitPos == null) { |
215 | 218 | hitPos = this.text.getEnd(); |