summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-01-07 15:32:18 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-01-07 15:32:18 (GMT)
commite32170009614d7f09c5f913b2767bd6cf0e15f7e (patch)
tree4e2fe64ce7917e1ec5cfdbef709a9d9deb5b8089 /generic
parent078fd483b608ea19f2d47f36f5a6a8a3a1c04405 (diff)
downloadtk-e32170009614d7f09c5f913b2767bd6cf0e15f7e.zip
tk-e32170009614d7f09c5f913b2767bd6cf0e15f7e.tar.gz
tk-e32170009614d7f09c5f913b2767bd6cf0e15f7e.tar.bz2
[Bug 2677890]: Fix odd text widget update problem that had scrollbars being
unable to cover the whole widget. Fix is to reify the range to update sooner.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkTextDisp.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index be9dd3b..9dc4316 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -12,7 +12,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.76 2010/01/02 22:52:38 dkf Exp $
+ * RCS: @(#) $Id: tkTextDisp.c,v 1.77 2010/01/07 15:32:18 dkf Exp $
*/
#include "tkInt.h"
@@ -2902,9 +2902,15 @@ AsyncUpdateLineMetrics(
return;
}
+ /*
+ * Reify where we end or all hell breaks loose with the calculations when
+ * we try to update. [Bug 2677890]
+ */
+
lineNum = dInfoPtr->currentMetricUpdateLine;
- if (lineNum == -1) {
- dInfoPtr->lastMetricUpdateLine = 0;
+ if (dInfoPtr->lastMetricUpdateLine == -1) {
+ dInfoPtr->lastMetricUpdateLine =
+ TkBTreeNumLines(textPtr->sharedTextPtr->tree, textPtr);
}
/*