diff options
author | hobbs <hobbs> | 2002-06-22 08:21:51 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2002-06-22 08:21:51 (GMT) |
commit | 49337e7328a834fc1ff7625cc8619e6d80d30070 (patch) | |
tree | 4b33174fd58b3eb7cbb1d1a584b23d10ac9388a4 /generic/tkTextIndex.c | |
parent | 098111d4b3e2012c4f3281a4e906683b464946d7 (diff) | |
download | tk-49337e7328a834fc1ff7625cc8619e6d80d30070.zip tk-49337e7328a834fc1ff7625cc8619e6d80d30070.tar.gz tk-49337e7328a834fc1ff7625cc8619e6d80d30070.tar.bz2 |
* doc/text.n: TIP #93 implementation that
* generic/tkText.c (TextWidgetCmd): enhances the text get and
* generic/tkTextIndex.c (TkTextGetIndex): delete methods to accept
* tests/text.test: multiple range pairs.
This handles the delete case in an atomic, fixed-index fashion.
Diffstat (limited to 'generic/tkTextIndex.c')
-rw-r--r-- | generic/tkTextIndex.c | 4 |
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; |