diff options
author | vincentdarley <vincentdarley> | 2005-05-13 13:46:11 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley> | 2005-05-13 13:46:11 (GMT) |
commit | f5d9e32d280a3ff212abadab720a28450dc12b62 (patch) | |
tree | e00f296081d0e86a99bafe7962701b541c5dfd7f /generic/tkTextDisp.c | |
parent | eeb260f0afaa25b9dba3ef18b9ca2b0c822f2183 (diff) | |
download | tk-f5d9e32d280a3ff212abadab720a28450dc12b62.zip tk-f5d9e32d280a3ff212abadab720a28450dc12b62.tar.gz tk-f5d9e32d280a3ff212abadab720a28450dc12b62.tar.bz2 |
fix to two text widget bugs
Diffstat (limited to 'generic/tkTextDisp.c')
-rw-r--r-- | generic/tkTextDisp.c | 19 |
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, |