summaryrefslogtreecommitdiffstats
path: root/generic/tkText.c
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley@noemail.net>2005-10-31 23:21:08 (GMT)
committervincentdarley <vincentdarley@noemail.net>2005-10-31 23:21:08 (GMT)
commitbde573159b09e751e461895f7b1b020f5ddf1cc0 (patch)
tree7e2d82d19f36ec47285aae9c6546275a49512269 /generic/tkText.c
parent2f97d2fe52d4c55d5621421a18bbc0687f58b2cc (diff)
downloadtk-bde573159b09e751e461895f7b1b020f5ddf1cc0.zip
tk-bde573159b09e751e461895f7b1b020f5ddf1cc0.tar.gz
tk-bde573159b09e751e461895f7b1b020f5ddf1cc0.tar.bz2
fix for count displaylines bug
FossilOrigin-Name: f3724e2ed93d9bfbfc136051362e41f3b0ee8f8d
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);