summaryrefslogtreecommitdiffstats
path: root/generic/tkTextIndex.c
diff options
context:
space:
mode:
authorfvogelnew1@free.fr <fvogel>2012-11-22 21:12:45 (GMT)
committerfvogelnew1@free.fr <fvogel>2012-11-22 21:12:45 (GMT)
commit9ceca8eedb3dec242e9bbfca9b510be787bbec87 (patch)
treeff3b6d6fa5599860c6784b8f10c4c7855f7a269e /generic/tkTextIndex.c
parent69c55bc6ba8daea94db4f07d448e28ba1970a0f2 (diff)
downloadtk-9ceca8eedb3dec242e9bbfca9b510be787bbec87.zip
tk-9ceca8eedb3dec242e9bbfca9b510be787bbec87.tar.gz
tk-9ceca8eedb3dec242e9bbfca9b510be787bbec87.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.