diff options
author | ericm <ericm@noemail.net> | 2000-02-03 21:27:26 (GMT) |
---|---|---|
committer | ericm <ericm@noemail.net> | 2000-02-03 21:27:26 (GMT) |
commit | 246177eed584cc3a8641f19076ed0d8a87b4aecf (patch) | |
tree | 5bbe3efa4585528a584178ddc5bd3eb3de508975 /generic | |
parent | a6bb73128bca731e0757ed44cacc5c35ae24ccad (diff) | |
download | tk-246177eed584cc3a8641f19076ed0d8a87b4aecf.zip tk-246177eed584cc3a8641f19076ed0d8a87b4aecf.tar.gz tk-246177eed584cc3a8641f19076ed0d8a87b4aecf.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).
FossilOrigin-Name: 2561693f8f435eee208e92918ffa8f1c28011159
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkFont.c | 6 |
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; |