diff options
author | dgp <dgp@users.sourceforge.net> | 2005-05-10 21:36:35 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2005-05-10 21:36:35 (GMT) |
commit | 88d2561621f99dad2a7f8bf122dac2c1d837ed25 (patch) | |
tree | 8dd31bde7b5085a15d32cbc44c42b2be67dfc55d /generic | |
parent | 99402b0b6312e1c1cd6c8e74b47cb65489e7625a (diff) | |
download | tk-88d2561621f99dad2a7f8bf122dac2c1d837ed25.zip tk-88d2561621f99dad2a7f8bf122dac2c1d837ed25.tar.gz tk-88d2561621f99dad2a7f8bf122dac2c1d837ed25.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')
-rw-r--r-- | generic/tkTextDisp.c | 6 |
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; } |