summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2005-10-31 23:21:08 (GMT)
committervincentdarley <vincentdarley>2005-10-31 23:21:08 (GMT)
commit37c5b1bdef50e5f82c896ce6008b00a9d0e5bc5c (patch)
tree7e2d82d19f36ec47285aae9c6546275a49512269 /generic
parentcb95f825a841442bb3ecb6b8c20141a1b0d91fbd (diff)
downloadtk-37c5b1bdef50e5f82c896ce6008b00a9d0e5bc5c.zip
tk-37c5b1bdef50e5f82c896ce6008b00a9d0e5bc5c.tar.gz
tk-37c5b1bdef50e5f82c896ce6008b00a9d0e5bc5c.tar.bz2
fix for count displaylines bug
Diffstat (limited to 'generic')
-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);