summaryrefslogtreecommitdiffstats
path: root/generic/tkTextDisp.c
diff options
context:
space:
mode:
authordgp@users.sourceforge.net <dgp>2005-05-10 21:36:35 (GMT)
committerdgp@users.sourceforge.net <dgp>2005-05-10 21:36:35 (GMT)
commit81fd2ba719589cf7bdf8181a3f1342a50ac89182 (patch)
tree8dd31bde7b5085a15d32cbc44c42b2be67dfc55d /generic/tkTextDisp.c
parente740fc417f05f6bddb546e8b5c7894b745df08c9 (diff)
downloadtk-81fd2ba719589cf7bdf8181a3f1342a50ac89182.zip
tk-81fd2ba719589cf7bdf8181a3f1342a50ac89182.tar.gz
tk-81fd2ba719589cf7bdf8181a3f1342a50ac89182.tar.bz2
* generic/tkTextDisp.c (GetXView): Improved numerical precision
of calculation of [.t xview] return values. * tests/textDisp.test: Match greater precisions of [.t xview] and [.t yview] values in tests.
Diffstat (limited to 'generic/tkTextDisp.c')
-rw-r--r--generic/tkTextDisp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index f85e0db..21f9e4b 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.48 2005/03/15 14:07:47 vincentdarley Exp $
+ * RCS: @(#) $Id: tkTextDisp.c,v 1.49 2005/05/10 21:36:37 dgp Exp $
*/
#include "tkPort.h"
@@ -5808,8 +5808,8 @@ GetXView(interp, textPtr, report)
if (dInfoPtr->maxLength > 0) {
first = ((double) dInfoPtr->curXPixelOffset)
/ dInfoPtr->maxLength;
- last = first + ((double) (dInfoPtr->maxX - dInfoPtr->x))
- / dInfoPtr->maxLength;
+ last = ((double) (dInfoPtr->curXPixelOffset + dInfoPtr->maxX
+ - dInfoPtr->x))/dInfoPtr->maxLength;
if (last > 1.0) {
last = 1.0;
}