summaryrefslogtreecommitdiffstats
path: root/generic/tkTextDisp.c
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2005-05-13 13:46:11 (GMT)
committervincentdarley <vincentdarley>2005-05-13 13:46:11 (GMT)
commitca42fb6e8a854824ce4a721366545f93b4922b7c (patch)
treee00f296081d0e86a99bafe7962701b541c5dfd7f /generic/tkTextDisp.c
parent1691f71e7dab25771a203f98d798028ddabd75bd (diff)
downloadtk-ca42fb6e8a854824ce4a721366545f93b4922b7c.zip
tk-ca42fb6e8a854824ce4a721366545f93b4922b7c.tar.gz
tk-ca42fb6e8a854824ce4a721366545f93b4922b7c.tar.bz2
fix to two text widget bugs
Diffstat (limited to 'generic/tkTextDisp.c')
-rw-r--r--generic/tkTextDisp.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 21f9e4b..6e6da31 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.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: tkTextDisp.c,v 1.49 2005/05/10 21:36:37 dgp Exp $
+ * RCS: @(#) $Id: tkTextDisp.c,v 1.50 2005/05/13 13:46:12 vincentdarley Exp $
*/
#include "tkPort.h"
@@ -1539,6 +1539,7 @@ LayoutDLine(textPtr, indexPtr)
*/
dlPtr->length = lastChunkPtr->x + lastChunkPtr->width;
+
return dlPtr;
}
@@ -1745,16 +1746,18 @@ UpdateDisplayInfo(textPtr)
}
if ((lineHeight != -1)
- && (lineHeight > TkBTreeLinePixelCount(textPtr,
+ && (lineHeight != TkBTreeLinePixelCount(textPtr,
prevPtr->index.linePtr))) {
/*
- * The logical line height we just calculated is actually
- * larger than the currently cached height of the
- * text line. That is fine (the text line heights
+ * The logical line height we just calculated is
+ * actually differnt to the currently cached height of
+ * the text line. That is fine (the text line heights
* are only calculated asynchronously), but we must
- * update the cached height so that any counts made
- * with DLine pointers do not exceed counts made
- * through the BTree.
+ * update the cached height so that any counts made with
+ * DLine pointers are the same as counts made through the
+ * BTree. This helps to ensure that the scrollbar size
+ * corresponds accurately to that displayed contents,
+ * even as the window is re-sized.
*/
TkBTreeAdjustPixelHeight(textPtr,
prevPtr->index.linePtr,