summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2014-12-23 10:59:48 (GMT)
committerfvogel <fvogelnew1@free.fr>2014-12-23 10:59:48 (GMT)
commit031d977db3ae61bf107687ef6a10dd235efbfb8b (patch)
tree5f281ddc5c231aa449f4520331c75ae4b66202c9 /generic
parent8936c6440460257c2739b3a6cdaf96c37d1cf04e (diff)
downloadtk-bug_c199ef90a6.zip
tk-bug_c199ef90a6.tar.gz
tk-bug_c199ef90a6.tar.bz2
Fixed wrong index returned by @x,y with elided lines at end of text - Bug [c199ef90a6]bug_c199ef90a6
Diffstat (limited to 'generic')
-rw-r--r--generic/tkTextDisp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index f16c45b..bb026af 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -6649,10 +6649,15 @@ DlineIndexOfX(
* We've reached the end of the text.
*/
+ TkTextIndexBackChars(NULL, indexPtr, 1, indexPtr, COUNT_INDICES);
return;
}
if (chunkPtr->nextPtr == NULL) {
- TkTextIndexBackChars(NULL, indexPtr, 1, indexPtr, COUNT_INDICES);
+ /*
+ * We've reached the end of the display line.
+ */
+
+ TkTextIndexBackChars(NULL, indexPtr, 1, indexPtr, COUNT_INDICES);
return;
}
chunkPtr = chunkPtr->nextPtr;