diff options
author | vincentdarley <vincentdarley@noemail.net> | 2003-11-08 17:22:45 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley@noemail.net> | 2003-11-08 17:22:45 (GMT) |
commit | b9c18ece8c464aec71caeac70ee72760208f4c17 (patch) | |
tree | d3be8a33f1d8bfc5c803dad0b85a7b30184743b9 /generic/tkTextBTree.c | |
parent | c6cd2f9a4fc2d373e0f98c1bb41d13aeb40796dc (diff) | |
download | tk-b9c18ece8c464aec71caeac70ee72760208f4c17.zip tk-b9c18ece8c464aec71caeac70ee72760208f4c17.tar.gz tk-b9c18ece8c464aec71caeac70ee72760208f4c17.tar.bz2 |
elide tag handling, once more
FossilOrigin-Name: 972024dfbc7ac7192b5b5f6194268209b4fb308c
Diffstat (limited to 'generic/tkTextBTree.c')
-rw-r--r-- | generic/tkTextBTree.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/generic/tkTextBTree.c b/generic/tkTextBTree.c index 7be9e7d..22d91c7 100644 --- a/generic/tkTextBTree.c +++ b/generic/tkTextBTree.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: tkTextBTree.c,v 1.9 2003/11/07 15:36:26 vincentdarley Exp $ + * RCS: @(#) $Id: tkTextBTree.c,v 1.10 2003/11/08 17:22:46 vincentdarley Exp $ */ #include "tkInt.h" @@ -2682,13 +2682,22 @@ TkBTreeGetTags(indexPtr, numTagsPtr) * TkTextIsElided -- * * Special case to just return information about elided attribute. - * Specialized from TkBTreeGetTags(indexPtr, numTagsPtr) - * and GetStyle(textPtr, indexPtr). - * Just need to keep track of invisibility settings for each priority, - * pick highest one active at end + * Specialized from TkBTreeGetTags(indexPtr, numTagsPtr) and + * GetStyle(textPtr, indexPtr). Just need to keep track of + * invisibility settings for each priority, pick highest one active + * at end. + * + * Note that this returns all elide information up to and including + * the given index (quite obviously). However, this does mean that + * indexPtr is a line-start and one then iterates from the beginning + * of that line forwards, one will actually revisit the segPtrs of + * size zero (for tag toggling, for example) which have already been + * seen here. * * Results: * Returns whether this text should be elided or not. + * + * Optionally returns more detailed information in elideInfo. * * Side effects: * None. @@ -2754,6 +2763,11 @@ TkTextIsElided(textPtr, indexPtr, elideInfo) } } } + /* + * Store the first segPtr we haven't examined completely + * so that our caller knows where to start. + */ + infoPtr->segPtr = segPtr; /* * Record toggles for tags in lines that are predecessors of @@ -2817,6 +2831,7 @@ TkTextIsElided(textPtr, indexPtr, elideInfo) } #endif infoPtr->elide = infoPtr->tagPtrs[i]->elide; + /* Note: i == infoPtr->tagPtrs[i]->priority */ infoPtr->elidePriority = i; break; } |