summaryrefslogtreecommitdiffstats
path: root/generic/tkTextIndex.c
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2012-12-04 17:02:22 (GMT)
committerdgp <dgp@noemail.net>2012-12-04 17:02:22 (GMT)
commit7f6cd209cdd218989374ae1110a7399f6521f320 (patch)
treecd8002bc80338c375b21e3ec5c47e7c1aee382c3 /generic/tkTextIndex.c
parentded175a3f2b67afc23b6cbc0d04e6e33fe6beb4f (diff)
parent66b1c3bb7224a96cec583f06a448fb96a99a1269 (diff)
downloadtk-7f6cd209cdd218989374ae1110a7399f6521f320.zip
tk-7f6cd209cdd218989374ae1110a7399f6521f320.tar.gz
tk-7f6cd209cdd218989374ae1110a7399f6521f320.tar.bz2
[Bug 3588824]: bug in image index handling for weird image names
FossilOrigin-Name: b5918b5b9e6c6b2f436a8476134a090a13c1fc52
Diffstat (limited to 'generic/tkTextIndex.c')
-rw-r--r--generic/tkTextIndex.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c
index 25888d8..fc97412 100644
--- a/generic/tkTextIndex.c
+++ b/generic/tkTextIndex.c
@@ -760,9 +760,11 @@ GetIndex(
/*
*---------------------------------------------------------------------
- * Stage 1: check to see if the index consists of nothing but a mark name.
- * We do this check now even though it's also done later, in order to
- * allow mark names that include funny characters such as spaces or "+1c".
+ * Stage 1: check to see if the index consists of nothing but a mark
+ * name, an embedded window or an embedded image. We do this check
+ * now even though it's also done later, in order to allow mark names,
+ * embedded window names or image names that include funny characters
+ * such as spaces or "+1c".
*---------------------------------------------------------------------
*/
@@ -770,6 +772,14 @@ GetIndex(
goto done;
}
+ if (TkTextWindowIndex(textPtr, string, indexPtr) != 0) {
+ return TCL_OK;
+ }
+
+ if (TkTextImageIndex(textPtr, string, indexPtr) != 0) {
+ return TCL_OK;
+ }
+
/*
*------------------------------------------------
* Stage 2: start again by parsing the base index.