summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-12-04 19:59:15 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-12-04 19:59:15 (GMT)
commitc95eb065cc73c0061774c8dfd35ce53bf3897258 (patch)
treec11d30dc34b313f8c279c3c4e2d8ced7ed12add9 /generic
parent5ccc87555d51c1b577e8d575af6a80e2b241bffd (diff)
parent879b6812977f71d6d2174da3e79e3341ab8ba549 (diff)
downloadtk-c95eb065cc73c0061774c8dfd35ce53bf3897258.zip
tk-c95eb065cc73c0061774c8dfd35ce53bf3897258.tar.gz
tk-c95eb065cc73c0061774c8dfd35ce53bf3897258.tar.bz2
merge trunk
Diffstat (limited to 'generic')
-rw-r--r--generic/tkTextImage.c4
-rw-r--r--generic/tkTextIndex.c16
-rw-r--r--generic/tkTextWind.c4
3 files changed, 21 insertions, 3 deletions
diff --git a/generic/tkTextImage.c b/generic/tkTextImage.c
index 1770cb6..4a98d42 100644
--- a/generic/tkTextImage.c
+++ b/generic/tkTextImage.c
@@ -786,6 +786,10 @@ TkTextImageIndex(
Tcl_HashEntry *hPtr;
TkTextSegment *eiPtr;
+ if (textPtr == NULL) {
+ return 0;
+ }
+
hPtr = Tcl_FindHashEntry(&textPtr->sharedTextPtr->imageTable, name);
if (hPtr == NULL) {
return 0;
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.
diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c
index d2998da..454d198 100644
--- a/generic/tkTextWind.c
+++ b/generic/tkTextWind.c
@@ -1340,6 +1340,10 @@ TkTextWindowIndex(
Tcl_HashEntry *hPtr;
TkTextSegment *ewPtr;
+ if (textPtr == NULL) {
+ return 0;
+ }
+
hPtr = Tcl_FindHashEntry(&textPtr->sharedTextPtr->windowTable, name);
if (hPtr == NULL) {
return 0;