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)
commitc42fd2467a87fcec4c26f0066cc1dae795d76efa (patch)
tree2153979123ea474273e88b45cb5b8b84ef2f0154 /generic
parentae84bfa27cd0654eff9d818741401fb17daf0628 (diff)
downloadtk-c42fd2467a87fcec4c26f0066cc1dae795d76efa.zip
tk-c42fd2467a87fcec4c26f0066cc1dae795d76efa.tar.gz
tk-c42fd2467a87fcec4c26f0066cc1dae795d76efa.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;