diff options
author | fvogel <fvogelnew1@free.fr> | 2020-01-18 11:27:55 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2020-01-18 11:27:55 (GMT) |
commit | 6a8038c617638af4e5eff2f17b422bb4fca72e58 (patch) | |
tree | 7e70f1a9b5c15513d3db94263af24327e99082af /generic | |
parent | cbb0d3cf9c121bd4bb384481c3548b77c6baf69a (diff) | |
parent | 05542a64bc612e706a0047c84094be69de5260c6 (diff) | |
download | tk-6a8038c617638af4e5eff2f17b422bb4fca72e58.zip tk-6a8038c617638af4e5eff2f17b422bb4fca72e58.tar.gz tk-6a8038c617638af4e5eff2f17b422bb4fca72e58.tar.bz2 |
Fix [1771594fff]: icursor @x,y fails for non-default scrollregions. Add non regression test canvText-14.7
Diffstat (limited to 'generic')
-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 61aa9be..eb70568 100644 --- a/generic/tkCanvText.c +++ b/generic/tkCanvText.c @@ -1429,8 +1429,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) { |