summaryrefslogtreecommitdiffstats
path: root/generic/tkFont.c
diff options
context:
space:
mode:
authorericm <ericm>2000-02-03 21:27:26 (GMT)
committerericm <ericm>2000-02-03 21:27:26 (GMT)
commit89c9f372d31b5e61756564807e468a9c3e1fa372 (patch)
tree5bbe3efa4585528a584178ddc5bd3eb3de508975 /generic/tkFont.c
parent32c58211007ce985f1da733cc7426626692dedf9 (diff)
downloadtk-89c9f372d31b5e61756564807e468a9c3e1fa372.zip
tk-89c9f372d31b5e61756564807e468a9c3e1fa372.tar.gz
tk-89c9f372d31b5e61756564807e468a9c3e1fa372.tar.bz2
* tests/canvText.test: test for fix for bug #2525.
* generic/tkFont.c (Tk_ComputeTextLayout): Was erroneously setting the width of newline-only text display chunks to some arbitrary huge number, instead of 0; this was interfering with things like the canvas find enclosed feature. (bug #2525).
Diffstat (limited to 'generic/tkFont.c')
-rw-r--r--generic/tkFont.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tkFont.c b/generic/tkFont.c
index e66a41e..913c335 100644
--- a/generic/tkFont.c
+++ b/generic/tkFont.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkFont.c,v 1.9 1999/12/21 23:55:11 hobbs Exp $
+ * RCS: @(#) $Id: tkFont.c,v 1.10 2000/02/03 21:27:26 ericm Exp $
*/
#include "tkPort.h"
@@ -1933,7 +1933,7 @@ Tk_ComputeTextLayout(tkfont, string, numChars, wrapLength, justify, flags,
continue;
}
} else {
- NewChunk(&layoutPtr, &maxChunks, start, 1, curX, 1000000000,
+ NewChunk(&layoutPtr, &maxChunks, start, 1, curX, curX,
baseline)->numDisplayChars = -1;
start++;
goto wrapLine;
@@ -2011,7 +2011,7 @@ Tk_ComputeTextLayout(tkfont, string, numChars, wrapLength, justify, flags,
if ((layoutPtr->numChunks > 0) && ((flags & TK_IGNORE_NEWLINES) == 0)) {
if (layoutPtr->chunks[layoutPtr->numChunks - 1].start[0] == '\n') {
chunkPtr = NewChunk(&layoutPtr, &maxChunks, start, 0, curX,
- 1000000000, baseline);
+ curX, baseline);
chunkPtr->numDisplayChars = -1;
Tcl_DStringAppend(&lineBuffer, (char *) &curX, sizeof(curX));
baseline += height;