diff options
Diffstat (limited to 'generic/tkCanvText.c')
-rw-r--r-- | generic/tkCanvText.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c index 84b2a23..48c0a9d 100644 --- a/generic/tkCanvText.c +++ b/generic/tkCanvText.c @@ -1392,8 +1392,8 @@ GetTextIndex( goto badIndex; } y = (int) ((tmp < 0) ? tmp - 0.5 : tmp + 0.5); - x += canvasPtr->scrollX1 - (int) textPtr->drawOrigin[0]; - y += canvasPtr->scrollY1 - (int) textPtr->drawOrigin[1]; + x -= (int) textPtr->drawOrigin[0]; + y -= (int) textPtr->drawOrigin[1]; *indexPtr = Tk_PointToChar(textPtr->textLayout, (int) (x*c - y*s), (int) (y*c + x*s)); } else if (Tcl_GetIntFromObj(NULL, obj, indexPtr) == TCL_OK) { |