summaryrefslogtreecommitdiffstats
path: root/generic/tkTextIndex.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkTextIndex.c')
-rw-r--r--generic/tkTextIndex.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c
index 1ee3b05..b130d32 100644
--- a/generic/tkTextIndex.c
+++ b/generic/tkTextIndex.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkTextIndex.c,v 1.4 2002/01/17 03:35:00 dgp Exp $
+ * RCS: @(#) $Id: tkTextIndex.c,v 1.5 2002/06/22 08:21:51 hobbs Exp $
*/
#include "default.h"
@@ -377,6 +377,7 @@ TkTextGetIndex(interp, textPtr, string, indexPtr)
&last);
TkBTreeStartSearch(&first, &last, tagPtr, &search);
if (!TkBTreeCharTagged(&first, tagPtr) && !TkBTreeNextTag(&search)) {
+ Tcl_ResetResult(interp);
Tcl_AppendResult(interp,
"text doesn't contain any characters tagged with \"",
Tcl_GetHashKey(&textPtr->tagTable, hPtr), "\"",
@@ -527,6 +528,7 @@ TkTextGetIndex(interp, textPtr, string, indexPtr)
return TCL_OK;
error:
+ Tcl_ResetResult(interp);
Tcl_AppendResult(interp, "bad text index \"", string, "\"",
(char *) NULL);
return TCL_ERROR;