[squeak-dev] The Trunk: ShoutCore-tpr.61.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Jun 5 23:18:20 UTC 2018


tim Rowledge uploaded a new version of ShoutCore to project The Trunk:
http://source.squeak.org/trunk/ShoutCore-tpr.61.mcz

==================== Summary ====================

Name: ShoutCore-tpr.61
Author: tpr
Time: 5 June 2018, 4:18:00.297486 pm
UUID: ffdd7656-d3c0-4017-994b-166224604658
Ancestors: ShoutCore-mt.60

Small performance optimisation for Shout when text is being saved; instead of the nasty #isKindOf: test the need to preserve the text attribute by sending a message not only actually does the same thing but appears to be intended for just this.

=============== Diff against ShoutCore-mt.60 ===============

Item was changed:
  ----- Method: SHTextStylerST80>>unstyledTextFrom: (in category 'converting') -----
  unstyledTextFrom: aText
  	"Re-implemented so that TextActions are not removed from aText"
  	| answer |	
  	answer := super unstyledTextFrom: aText.
  	aText runs withStartStopAndValueDo: [:start :stop :attribs |
+ 		(attribs anySatisfy: [:each | each shoutShouldPreserve])
- 		(attribs anySatisfy: [:each | each isKindOf: TextAction])
  			ifTrue: [
  				attribs do: [:eachAttrib | answer addAttribute: eachAttrib from: start to: stop]]].
  	^answer!



More information about the Squeak-dev mailing list