summaryrefslogtreecommitdiffstats
path: root/generic/tkTest.c
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2004-09-10 12:13:38 (GMT)
committervincentdarley <vincentdarley>2004-09-10 12:13:38 (GMT)
commit09324dada308a84a1d5ba8b14bff2a5ce8b6eaf9 (patch)
treec17ff6a17da4273024607033b6c1bd7bf35d2d8f /generic/tkTest.c
parent77f2c1e62ab0760dc6ee615d6bbcb81b11d76a6f (diff)
downloadtk-09324dada308a84a1d5ba8b14bff2a5ce8b6eaf9.zip
tk-09324dada308a84a1d5ba8b14bff2a5ce8b6eaf9.tar.gz
tk-09324dada308a84a1d5ba8b14bff2a5ce8b6eaf9.tar.bz2
text widget 'peer' subcommand -- TIP#169 implementation
Diffstat (limited to 'generic/tkTest.c')
-rw-r--r--generic/tkTest.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/generic/tkTest.c b/generic/tkTest.c
index f3f5931..7a5256f 100644
--- a/generic/tkTest.c
+++ b/generic/tkTest.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkTest.c,v 1.23 2004/03/17 18:15:44 das Exp $
+ * RCS: @(#) $Id: tkTest.c,v 1.24 2004/09/10 12:13:40 vincentdarley Exp $
*/
#include "tkInt.h"
@@ -2338,7 +2338,8 @@ TesttextCmd(clientData, interp, argc, argv)
lineIndex = atoi(argv[3]) - 1;
byteIndex = atoi(argv[4]);
- TkTextMakeByteIndex(textPtr->tree, lineIndex, byteIndex, &index);
+ TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, textPtr, lineIndex,
+ byteIndex, &index);
} else if (strncmp(argv[2], "forwbytes", len) == 0) {
if (argc != 5) {
return TCL_ERROR;
@@ -2347,7 +2348,7 @@ TesttextCmd(clientData, interp, argc, argv)
return TCL_ERROR;
}
byteOffset = atoi(argv[4]);
- TkTextIndexForwBytes(&index, byteOffset, &index);
+ TkTextIndexForwBytes(textPtr, &index, byteOffset, &index);
} else if (strncmp(argv[2], "backbytes", len) == 0) {
if (argc != 5) {
return TCL_ERROR;
@@ -2356,13 +2357,13 @@ TesttextCmd(clientData, interp, argc, argv)
return TCL_ERROR;
}
byteOffset = atoi(argv[4]);
- TkTextIndexBackBytes(&index, byteOffset, &index);
+ TkTextIndexBackBytes(textPtr, &index, byteOffset, &index);
} else {
return TCL_ERROR;
}
TkTextSetMark(textPtr, "insert", &index);
- TkTextPrintIndex(&index, buf);
+ TkTextPrintIndex(textPtr, &index, buf);
sprintf(buf + strlen(buf), " %d", index.byteIndex);
Tcl_AppendResult(interp, buf, NULL);