summaryrefslogtreecommitdiffstats
path: root/generic/tkTextIndex.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2012-11-22 21:12:45 (GMT)
committerfvogel <fvogelnew1@free.fr>2012-11-22 21:12:45 (GMT)
commit7a16c4ecf67b9294f4e677a5d6cfb995eb9b6cd6 (patch)
treeff3b6d6fa5599860c6784b8f10c4c7855f7a269e /generic/tkTextIndex.c
parent0b6e717a44dff02a2ce046473bbe798a8e07d6c9 (diff)
downloadtk-7a16c4ecf67b9294f4e677a5d6cfb995eb9b6cd6.zip
tk-7a16c4ecf67b9294f4e677a5d6cfb995eb9b6cd6.tar.gz
tk-7a16c4ecf67b9294f4e677a5d6cfb995eb9b6cd6.tar.bz2
[Bug 3588824]: bug in image index handling for weird image names
Diffstat (limited to 'generic/tkTextIndex.c')
-rw-r--r--generic/tkTextIndex.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c
index 7cfeaea..714a47d 100644
--- a/generic/tkTextIndex.c
+++ b/generic/tkTextIndex.c
@@ -328,9 +328,10 @@ TkTextGetIndex(interp, textPtr, string, indexPtr)
/*
*---------------------------------------------------------------------
* 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".
+ * 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".
*---------------------------------------------------------------------
*/
@@ -338,6 +339,14 @@ TkTextGetIndex(interp, textPtr, string, indexPtr)
return TCL_OK;
}
+ 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.