summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2020-01-18 11:27:30 (GMT)
committerfvogel <fvogelnew1@free.fr>2020-01-18 11:27:30 (GMT)
commit05542a64bc612e706a0047c84094be69de5260c6 (patch)
tree61e06e5d842cdafb18a013fa1265a5c747e5a383 /generic
parent79c5f1c7d88f15c439d5c4e9258ffd44b6061493 (diff)
parentecf107511446fc5f2143d963b23f5a63020a04b3 (diff)
downloadtk-05542a64bc612e706a0047c84094be69de5260c6.zip
tk-05542a64bc612e706a0047c84094be69de5260c6.tar.gz
tk-05542a64bc612e706a0047c84094be69de5260c6.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.c4
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) {