summaryrefslogtreecommitdiffstats
path: root/generic/tkText.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkText.c')
-rw-r--r--generic/tkText.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tkText.c b/generic/tkText.c
index 5313ed3..1a6477f 100644
--- a/generic/tkText.c
+++ b/generic/tkText.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: tkText.c,v 1.60 2005/10/10 10:36:35 vincentdarley Exp $
+ * RCS: @(#) $Id: tkText.c,v 1.61 2005/10/31 23:21:08 vincentdarley Exp $
*/
#include "default.h"
@@ -904,6 +904,15 @@ TextWidgetObjCmd(clientData, interp, objc, objv)
*/
index = *indexFromPtr;
+ index.byteIndex = 0;
+
+ /*
+ * We're going to count up all display lines in the
+ * logical line of 'indexFromPtr' up to, but not
+ * including the logical line of 'indexToPtr', and
+ * then subtract off what we didn't what from 'from'
+ * and add on what we didn't count from 'to.
+ */
while (index.linePtr != indexToPtr->linePtr) {
value += TkTextUpdateOneLine(textPtr, fromPtr, 0,&index,0);