[ tktoolkit-Bugs-1288677 ] elide removes more than just text

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ tktoolkit-Bugs-1288677 ] elide removes more than just text

SourceForge.net
Bugs item #1288677, was opened at 2005-09-12 22:51
Message generated for change (Comment added) made by wildcard_25
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112997&aid=1288677&group_id=12997

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: 18. [text]
Group: development: 8.5a4
Status: Open
Resolution: None
Priority: 5
Submitted By: Daniel South (wildcard_25)
Assigned to: Vince Darley (vincentdarley)
Summary: elide removes more than just text

Initial Comment:
Fix:-
Revert line 1352 in tkTextDisp.c 1.52 from
        if (!elide && chunkPtr->numBytes > 0) {
to
        if (chunkPtr->numBytes > 0) {

This causes no new test failures on WinXP


From the man pages:-

Elide specifies whether the data should be elided.
Elided data is not displayed and takes no space on
screen, but further on behaves just as normal data.

However after the changes in tkTextDisp.c from 1.16
to 1.17, elide no longer allows the formatting
information from the tag to be used.

example text dump:-
tagon NICK-ivany 7.1 tagon STAMP 7.1 text
{[18:39]    } 7.1 tagoff STAMP 7.9 tagon NICK 7.9
text {ivany    } 7.9 tagoff NICK 7.15 tagon MSG 7.15
text /see 7.15 tagoff MSG 7.19 tagon NICK 7.19 text {
} 7.19 tagoff NICK 8.0 tagoff NICK-ivany 8.0

If the STAMP tag has a -lmargin value of 20 then the
output should be (approx.)
  [18:39]    ivany    /see

If STAMP is then elided we get this in 8.4.11
  ivany    /see

in 8.5 we get (without the initial indent)
ivany    /see

----------------------------------------------------------------------

>Comment By: Daniel South (wildcard_25)
Date: 2005-09-13 15:20

Message:
Logged In: YES
user_id=596509

The following works correctly for Tk8.4 but not for Tk8.5
This only demonstates the change using -lmargin1, all
other formatting properties of the elided tags are ignored
as well.

# set up text widget
text .t -height 30 -width 100
pack .t
.t insert end {test text using tags 1 and 3 }         {testtag1 testtag3}         {[this bit here uses tags 2 and 3]}         {testtag2 testtag3}

# indent left margin of tag 1 by 20 pixels
# text should be indented
.t tag configure testtag1 -lmargin1 20

# hide tag 1, remaining text should still be indented
.t tag configure testtag1 -elide 1

# reset
.t tag configure testtag1 -lmargin1 0
.t tag configure testtag1 -elide 0

# indent left margin of tag 2 by 20 pixels
# text should not be indented
.t tag configure testtag2 -lmargin1 20

# hide tag 1, remaining text should still not be indented
.t tag configure testtag1 -elide 1

# reset
.t tag configure testtag2 -lmargin1 0
.t tag configure testtag1 -elide 0

# indent left margin of tag 3 by 20 pixels
# text should be indented
.t tag configure testtag3 -lmargin1 20

# hide tag 1, remaining text should still be indented
.t tag configure testtag1 -elide 1

# reset
.t tag configure testtag3 -lmargin1 0
.t tag configure testtag1 -elide 0


----------------------------------------------------------------------

Comment By: Vince Darley (vincentdarley)
Date: 2005-09-13 00:12

Message:
Logged In: YES
user_id=32170

Can you give a full example and explanation, please, ideally
something that doesn't depend on some state of TkChat?  (
pack [text .t] ; .t insert.... etc).



----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112997&aid=1288677&group_id=12997


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Tcl-Bugs mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-bugs