[squeak-dev] Suspicious TextAnchor emphasizeScanner:

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Fri Oct 4 21:24:06 UTC 2013


>From Bob's history site (http://69.251.218.6:9116/diffs) we can see this :

emphasizeScanner:

--squeak 1.31--
emphasizeScanner: scanner

    scanner placeEmbeddedObject: anchoredMorph

4614TextAndFonts-ar.cs
emphasizeScanner: scanner

    scanner placeEmbeddedObject: anchoredMorph
    "Do nothing for emphasizing the scanner - if the anchor is valid a
#embeddedObject will be encountered by the scanner and do the real thing"

Indeed, a TextAnchor is associated with character of asciiValue 1, and
there is a DefaultStopCondition for that which will invoke #embeddedObject
stopCondition...

But current implementation is back to old implementation

!TextAnchor methodsFor: 'visiting' stamp: 'lr 2/3/2006 16:13'!
emphasizeScanner: aScanner
    self anchoredMorph ifNil: [ ^ self ].
    aScanner placeEmbeddedObject: self anchoredMorph.

This has wrong consequences when the embedded morph crosses the right
margin... It is then not displayed at the right place (too far right on the
next line), presumably because indentation would occur twice but logic is
really hard to follow...

So I suggest reverting... Any hint on this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20131004/ba7cb958/attachment-0001.htm


More information about the Squeak-dev mailing list