summaryrefslogtreecommitdiffstats
path: root/generic/tkTextIndex.c
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2012-12-04 16:37:18 (GMT)
committerdgp <dgp@noemail.net>2012-12-04 16:37:18 (GMT)
commit66b1c3bb7224a96cec583f06a448fb96a99a1269 (patch)
treeb0fdcc8a70e63856b4cd8894cb579d21f1365a7a /generic/tkTextIndex.c
parent4e1fb8717b5a717195466c6d4387465b65eda234 (diff)
parent3bff8bf2b14af5d45b793e50d2b1238c5ef4070a (diff)
downloadtk-66b1c3bb7224a96cec583f06a448fb96a99a1269.zip
tk-66b1c3bb7224a96cec583f06a448fb96a99a1269.tar.gz
tk-66b1c3bb7224a96cec583f06a448fb96a99a1269.tar.bz2
[Bug 3588824]: bug in image index handling for weird image names
FossilOrigin-Name: 22d3368e71cab5f668519e2542f0863360ddd0ca
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 a9b0bed..70c94db 100644
--- a/generic/tkTextIndex.c
+++ b/generic/tkTextIndex.c
@@ -758,9 +758,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".
*---------------------------------------------------------------------
*/
@@ -768,6 +770,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.