summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2014-12-23 11:09:50 (GMT)
committerfvogel <fvogelnew1@free.fr>2014-12-23 11:09:50 (GMT)
commit8410740338e3be5223b127941f7d9a4f89b5ce70 (patch)
tree2153979123ea474273e88b45cb5b8b84ef2f0154 /generic
parent9acc2ec22a702fc2ececac284fccf4a7698801b2 (diff)
downloadtk-8410740338e3be5223b127941f7d9a4f89b5ce70.zip
tk-8410740338e3be5223b127941f7d9a4f89b5ce70.tar.gz
tk-8410740338e3be5223b127941f7d9a4f89b5ce70.tar.bz2
Cherrypicked bug fix for Bug [c199ef90a6] - Wrong index returned by @x,y with elided lines at end of text
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 9d6a307..14f843b 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -6754,10 +6754,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;